Tata wrote:Could the pages be separated about like this?
Code: Select all
<div (unique id or class)>
<h1>Page 1</h1>
{Page 1 content}
</div>
<div (unique id or class)>
<h1>Page 2</h1>
{Page 2 content}
<div (unique id or class)>
<h2>Page 2-1</h2>
{Page 2-1 content}
</div>
<div (unique id or class)>
<h2>Page 2-2</h2>
{Page 2-2 content}
</div>
</div>
...
In my opinion there is no need to store the page structure in content.htm. You could instead customize
content(). Basically, you have change both
return statements to also output the <div> (maybe <article> would be more appropriate). If you don't want to customize content(), you can alternatively put a copy of it into userfuncs.php, rename it, modify it and call the new function from the template instead of content().
Either way, you have to find a way to set and get the unique ID or class. In the simplest case this could be done by setting a variable on each page via CMSimple scripting, for instance:
Alternatively, you could use Morepagedata (or a custom addon/plugin) to set this variable.
If the page names won't change (often), you could use these as ID/class by using $su (you'd have to strip/replace some characters, though).
See also
Page specific Adjustments and
Using own styles for each page for more ideas.