Forum Moderators: phranque

Message Too Old, No Replies

Nested templates and site organization

is this going too far?

         

Kuyler

9:46 pm on Jun 27, 2005 (gmt 0)

10+ Year Member



Hi there,

I'm developing my first site, and I was wondering if you could help me with the following organizational issues.

In simple terms, my site will have something like an encyclopedia structure, with the number of entries potentially reaching a very high number. What I had in mind was this:

- Level 1 template: Just the website header and copyright footer will be non-editable (they are to be the same on all pages)
- Level 2 template: The encyclopedia entry template. The left sidebar headings will be non-editable, but the subheadings can differ (in terms of both name and total number) from entry to entry. I was thinking of setting these as repeating regions.
- Level 3 template: A template devoted to each specific entry (since each entry has several pages devoted to it). The sidebar headings AND subheadings will be non-editable.

The problem is, the template ratio across these three levels will be 1:1:X, where X could certainly exceed 100. Does this look screwy to you guys? With such a complex template structure, I fear things could easily unravel, sooner or perhaps a lot later down the line. Are there any alternatives, given the structure of my site? Or is this template structure pretty doable? Thanks in advance!

treeline

10:11 pm on Jun 27, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I follow your logic for templates 1 & 2. Seems solid. I don't understand why you've got template 3 for, or why it's different from #2. If EVERY entry is to have its own template, why have a template you don't reuse? The whole point is to save work on the NEXT repetition.

Couldn't you just type the entries into template #2 and be all set? Three layers of templates is no big deal, I'd go for that. But hundreds of templates unless you have many thousands of pages sounds like overkill.

Maybe you'd be better off with:

1 - General site info, masthead
2 - Headings, structure, organization
3 - Entries, by type of entry
3a - biographies
3b - countries
3c - inventions
3d - works of literature
3e - the other stuff

This way you can cover almost anything with less than a dozen templates, and the templates will speed you on your way while keeping you organized with a consistent look and feel.

Kuyler

10:38 pm on Jun 27, 2005 (gmt 0)

10+ Year Member



Thanks for the reply.

The reason I am considering that infernal third template layer is the fact that there are a number of separate subsection pages which fall under each entry. To use a hypothetical example, let's say my entries are countries. Every country has a profile pic of X by Y pixels, and each country side bar has the following main headings: History, Economy, People. Unfortunately, there are subsections to these sections, so Country A may have:

History
- Era A
- Era B
- Era C

while Country B may have:

History
- Era X
- Era Y

And unfortunately, I aim to have each subsection's content on a different page. I could revise this, I suppose, but I had the impression that it was best to split up content rather than to put everything on one long uber-page and use named anchors.

So yeah, Country A would have one page for Era A, one for Era B, one for Era C, and then others for other subsections. So what happens if suddenly I decide to add a page on Era D? I'd have to physically add the Era D subsection to the sidebars of Era A's page, Era B's page, and so on. Or what happens if I wanted to change the entry's profile pic? Same issue.

Maybe my main issue isn't so much the templates, but how I have organized the site? Further comments will be much appreciated.

treeline

10:50 pm on Jun 27, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Step back and look at your subjects from a distance. Look for what they have in common. You want to maximize repetition in the structure. You should probably work up a few sample entries to help you look for common template elements.

What you want in your country/history/era example is either a country or a history template. Let's imagine you use a history template. You really only need ONE template for this.

Era A changes the default title to Era A, then types in any text and subheadings.

Era B changes the default title to Era B, then types in any text and subheadings.

Era C, X, Y.......repeats

There should be a cookie track feature that shows where you are:
Home > Countries > Atlantis > Preflood
This is a feature of every page, you may want to use a script or library item in your #2 template to implement this.

Minimize the work, you'll love yourself for it.

Kuyler

4:42 am on Jun 28, 2005 (gmt 0)

10+ Year Member



Thanks for the help again. :)

You say for instance that "Era A changes the default title to Era A, then types in any text and subheadings". Is this the script or library item that does the "typing in" as you put it? Or do you only mean the script/lib item in connection with the location breadcrumbs?

That's the dilemma really. In terms of functionality, I want this site to be as simple as possible. But if using a script is the only option left... :(

Oh, and another thing. As I said, the main headings on the sidebar will be the same for every single entry. I was considering having a separate directory for each entry. If each of them had say exactly one page devoted to a People section, does it sound like bad design practice to have a people.htm file inside each of these directories? I mean, as long as they remain within their correct directory, everything is fine, but mix them together, and all hell breaks loose.

The main advantage of the above would be that for the level 2 template, the People link on the sidebar would just link to people.htm, and that would be correct for every single instance.

If there was such a thing as "partial" linkage in HTML, I could instead link to people*.htm in the template, and then in each directory have a file named people_entryName.htm, so that it would not only be a uniquely-named file, but would get picked up by this simple linking convention. I suppose I'm dreaming, right? Again, many thanks!