Webmastersite.net
Register Log In

condition for different custom templates
what is the correct way to do that?

Comments on condition for different custom templates

gemini
Forum Regular

Usergroup: Customer
Joined: Oct 30, 2003

Total Topics: 54
Total Comments: 197
gemini
Posted Oct 20, 2006 - 8:17 AM:

I'm trying to use two custom templates to display links for members and for not registered/logged users. So far very little success. Here is the condition I came up with:


<IF {THISMEMBERUSERGROUP} is 1>
[INSERTFILE=displaylinks_members]
<OTHERWISE>
[INSERTFILE=displaylinks_visitors]
</IF>


I don't know why, but this condition works only if it's true - if it is false it shows [INSERTFILE=displaylinks_visitors] line on the screen. Also, when I use [INSERFILE] function on a file that has another [INSERFILE] in it - it doesn't show the second file content, but the actual function code line in the html output. Any ideas on the implementation?
babrees
Expert

Usergroup: Customer
Joined: Aug 19, 2005
Location: England

Total Topics: 391
Total Comments: 1303
babrees
Posted Oct 21, 2006 - 2:49 AM:

I may be reading you wrong, but group 1 is guests.

I usually use:

<IF {THISMEMBERISGUEST}>
INSERT VISITORS STUFF
<OTHERWISE>
INSERT MEMBERS STUFF
</IF>
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Oct 23, 2006 - 11:25 PM:

[INSERTFILE isn't supposed to be recursive.


<IF {THISMEMBERUSERGROUP} is 1>
[INSERTFILE=test1]
<OTHERWISE>
[INSERTFILE=test2]
</IF>
certainly works though, tested at http://temp.wsnforum.com/wsnlinks

babrees's way of doing it is better though since I'm not sure if yours would work if you integrated the member system.
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



This thread is closed, so you cannot post a reply.