Page 1 of 1

[Solved] FrontEndUsers viewuser template

Posted: Mon Apr 09, 2012 7:02 pm
by musicscore
I'm building a website where customers can login and go to a customerpage.On this page I want the user to see his settings used in frontendusers.
I use :

Code: Select all

(FrontEndUsers action='viewuser'}
and the settings are printed on the page.
But I want to have control over the layout so I open the detailtemplate:

Code: Select all

{* view user template *}
<p>{$feu->Lang('id')}:&nbsp;{$userinfo.id}</p>
<p>{$feu->Lang('username')}:&nbsp;{$userinfo.username}</p>
<p>{$feu->Lang('expires')}:&nbsp;{$userinfo.expires}</p>
{foreach from=$user_properties item='entry'}
<p>{$entry.prompt}:&nbsp;{$entry.data}</p>
{/foreach}
I tryed to add this line :

Code: Select all

<p>Adres:&nbsp;{$userinfo.adres}</p>
but the 'adres' field is not shown.

Using the foreach loop doesn't give me any control over the layout.

How can I solve my problem. Please help ...

Musicscore

Re: FrontEndUsers viewuser template

Posted: Mon Apr 09, 2012 9:38 pm
by Peciura
Read this tip on inspecting variables http://wiki.cmsmadesimple.org/index.php ... ode.2Fsite

Re: FrontEndUsers viewuser template

Posted: Tue Apr 10, 2012 8:28 pm
by kembl
musicscore wrote: ...

Code: Select all

<p>Adres:&nbsp;{$userinfo.adres}</p>
but the 'adres' field is not shown.
...
As a fast guess you may have the mistake in 'address' field name :)
Try this and see $userinfo array field names

Code: Select all

 <pre> {$userinfo|var_export} </pre>
this the same which Peciura mentored

Re: FrontEndUsers viewuser template

Posted: Wed Apr 11, 2012 1:06 pm
by musicscore
Thanx for the response.
I used {get_template_vars} and could see all the vars I could use. This solved my problem.

Thanx again for your help.

Musicscore