splitting content

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
bladecatcher
Forum Commoner
Posts: 67
Joined: Sat Mar 12, 2005 12:50 am

splitting content

Post 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
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post 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.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

please don't cross/double post again bladecatcher.
Post Reply