and hello again!
I tried to use the [[+active]]-placeholder already within my usersList-template/chunk:
<li class="[[+cls]]">
<a [[+user:is=`[[+id]]`:then=`class="active"`]] title="[[++cultureKey:is=`de`:then=`Benutzerkonto von [[+user]] anschauen`:else=`View account of [[+user]]`]]" href="[[++cultureKey:is=`de`:then=`[[~241]]`:else=`[[~242]]`]]?user=[[+id]]">[[+firstName]] [[+lastName]]</a> [b][[+active]][/b]
</li>
Then I get a "1" stated behind each users first- and lastName...because I think it checks for my own profile, the logged in one, which is actived for sure
As I (thought I) "know" from several researches in this forum I thought this could help:
[[*active]] - no output
[[~active]] - no output
[[~[[+active]]]] - site root?!
[[~[[*active]]]] - no putput
But I'm still not getting when to use what, always try'n'error...
I did check the related snippet too, but I couldn't find a way on how to filter for the active users.
I think I have to edit the PeopleGroup-snippet to my needs.
/* get users */
$c = $modx->newQuery($userClass);
$c->innerJoin('modUserGroupMember','UserGroupMembers');
$c->innerJoin('modUserGroupRole','UserGroupRole','UserGroupMembers.role = UserGroupRole.id');
$c->where(array(
'UserGroupMembers.user_group' => $usergroup->get('id'),
$total = $modx->getCount($userClass,$c);
$c->select($modx->getSelectColumns($userClass,$userClass));
$c->select(array(
'UserGroupRole.name AS role',
'UserGroupRole.id AS role_id',
));
));
And I think the "where(array" (line 5) could be responsible for that...or the "select(arry" (line 9)? But my researches didn't help me so far...again.
EDIT: I also wanted to add another field to the usersList like that:
<li class="[[+cls]]">
<a [[+user:is=`[[+id]]`:then=`class="active"`]] title="[[++cultureKey:is=`de`:then=`Benutzerkonto von [[+user]] anschauen`:else=`View account of [[+user]]`]]" href="[[++cultureKey:is=`de`:then=`[[~241]]`:else=`[[~242]]`]]?user=[[+id]]">[[+firstName]] [[+lastName]]</a> [b][[+start]][/b]
</li>
[[+start]] holds a year that gets chosen by updating the profile via a select-box. But if I implement the placeholder I'm getting the correct value for those users who have entered a value to this field already, but for any other user who hasn't entered a value yet the value of the actual chosen user gets displayed for them...hard to explain
User 1 - no value
User 2 - 2007
User 3 - 2008
Being on the profile of User 1:
User 1 - no value
User 2 - 2007 - correct value
User 3 - 2008 - correct value
Being on the profile of User 2:
User 1 - 2007 - value from User 2, should be empty
User 2 - 2007 - correct value
User 3 - 2008 - correct value
Being on the profile of User 3:
User 1 - 2008 - value from User 3, should be empty
User 2 - 2007 - correct value
User 3 - 2008 - correct value
[ed. note: profilneurotiker last edited this post 9 years, 6 months ago.]