[Solved] FrontEndUsers viewuser template

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
musicscore
Power Poster
Power Poster
Posts: 478
Joined: Wed Jan 25, 2006 11:53 am
Location: Netherlands

[Solved] FrontEndUsers viewuser template

Post 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
Last edited by musicscore on Wed Apr 11, 2012 1:06 pm, edited 1 time in total.
Peciura

Re: FrontEndUsers viewuser template

Post by Peciura »

Read this tip on inspecting variables http://wiki.cmsmadesimple.org/index.php ... ode.2Fsite
User avatar
kembl
Forum Members
Forum Members
Posts: 16
Joined: Wed Feb 22, 2012 9:13 pm

Re: FrontEndUsers viewuser template

Post 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
musicscore
Power Poster
Power Poster
Posts: 478
Joined: Wed Jan 25, 2006 11:53 am
Location: Netherlands

Re: FrontEndUsers viewuser template

Post 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
Post Reply

Return to “Modules/Add-Ons”