splitting content
Posted: Sun Apr 10, 2005 10:32 pm
I'm using a template like script to build pages.
I'm also using sessions to authenticate access to members and guests.
The content component is in xhtml.
Now I'm at the testing stage, I've started to prepare a few of the xhtml files and realised a lot of the content is an amalgamation of 'guest' and 'member' stuff. I don't really want to have a separate page for each class of user, with largly identical content.
I'm wondering if I could modify the xhtml files to xml and use tags to decide what to display?
i.e. the stuff enclosed by the <member> tag should only be written to a member session.
I've read the W3C tutorials on XML.
My question is: Is there an easy way of separating the content without having to parse all the xhtml tags as well as the xml tags???
apologies in advance as I realise I have not phrased the question well (cringe).
Thanking you in anticipation,
bladecatcher
feyd | Please review how to post code using
I'm also using sessions to authenticate access to members and guests.
The content component is in xhtml.
Now I'm at the testing stage, I've started to prepare a few of the xhtml files and realised a lot of the content is an amalgamation of 'guest' and 'member' stuff. I don't really want to have a separate page for each class of user, with largly identical content.
I'm wondering if I could modify the xhtml files to xml and use tags to decide what to display?
i.e. the stuff enclosed by the <member> tag should only be written to a member session.
Code: Select all
<h1>My Page</h1>
<p><em>16/03/2005</em><br />
Sorry, we were offline for a few hours this morning, someone tripped over the extension lead.
</p>
<member>
<p>
<strong><em>03/03/2005</em>
<br />
Barton Mawer WINS at Australian Grand Prix (<a href="e;lindsay/bartonmawer.htm"e; target="e;main"e;>more</a>).</strong>
</p>
</member>My question is: Is there an easy way of separating the content without having to parse all the xhtml tags as well as the xml tags???
apologies in advance as I realise I have not phrased the question well (cringe).
Thanking you in anticipation,
bladecatcher
feyd | Please review how to post code using
Code: Select all
andCode: Select all
tags. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]