Author
|
Message
|
Alessandro Cipriani
|
Thursday 06 May 2004 2:40:00 am
hi all
i'm trying to fetch (on the frontend of my site) the list of all the users of my site. i'm not able to display any information, also if i setup the anonymous role to * * *. there's the code:
{let customers_list=fetch( user, tree, hash( parent_node_id, 508,
sort_by, array( name, true() ) ) )}
{section name=Customers loop=$customers_list}
-{$Customers:item.name}<br>
{/section}
{/let}
any hint?
best regards alessandro
|
Tore Skobba
|
Thursday 06 May 2004 3:12:22 am
Hi Well I am using this to fetch the latest user on my site and it works fine. I note that I use content instead of user in my fetch.. Please remember to change parent_node_id and class_filter_array (I am using my own customized user class)
{* Fetch the latest 5 members *}
{let new_members=fetch('content',tree,
hash(parent_node_id,5,main_node_only, true(),class_filter_type, "include", class_filter_array, array(33),sort_by,array(published,false()) ))}
<div class="latest_box">
<h2>{'New members'|i18n("design/gsa/node/view")}</h2>
<ul>
{section loop=$new_members}
<li>{node_view_gui view=line content_node=$item}</li>
{/section}
</ul>
{/let} </div>
|
Alessandro Cipriani
|
Thursday 06 May 2004 3:24:55 am
mm still doesn't work..
{let customers_list=fetch('content',tree,
hash(parent_node_id,2,main_node_only, true(),class_filter_type, "include", class_filter_array, array(34),sort_by,array(published,false()) ))}
<ul>
{section name=Customers loop=$customers_list}
<li>{node_view_gui view=line content_node=$item}</li>
{/section}
</ul>
{/let}
</code
2 is the node_id of the home node... is it right?
icq# 326 457 502
|
Bjørn Kaarstein
|
Thursday 06 May 2004 3:56:36 am
Hi.
2 is the home node, but that's not where the users are stored. In the admin interface, go to the users tab and hold your cursor over the user group you want to fetch from. In the status bar of your browser you'll see the node id you want. Regards Bjørn
|
Tore Skobba
|
Thursday 06 May 2004 5:13:36 am
Hi Bjørn 2 is the default parent node for all users.. Unless you have changed the EZ installation seriously, the above should fetch all users of class 34!. Since I am using tree it should fetch all the users within the various user groups also. But do remember that you have to set your user class id correctly. Secondly make sure that the anonymous user are allowed to see the users, i.e. have read access in section 2!
Cheers Tore
|