Page 1 of 1

splitting content

Posted: Tue Apr 12, 2005 1:33 am
by bladecatcher
G'day All,
I unsure where to put this, feel free to move it please.

I'm using a php template to generate pages from xhtml content on my web site. Some content is for members only, but most is for all. I don't want to duplicate pages when it's largely the same content. I want to split content so that some is viewable by guests and some by members.

Would someone please suggest a path to achieve this?

Thanking you in anticipation,
bladecatcher

Posted: Tue Apr 12, 2005 6:48 am
by John Cartwright
Moved to PHP-Code

in my templating engine, I have something like this

Code: Select all

$template->svar(array(     'LINK' => ($_SESSIONї'loggedin'] ? 'logout' : 'login'));
and

Code: Select all

<a href=&quote;?goto=home&quote;>Home</a> | <a href=&quote;?goto=members&quote;>Members</a> | <a href=&quote;?goto=user&{LINK}&quote;>{LINK}</a>

Hope this clears it up.

Posted: Thu Apr 14, 2005 5:39 pm
by feyd
please don't cross/double post again bladecatcher.