On 2005-05-04 10:25:06 -0400, "Linczak, Jonathan W." <[EMAIL PROTECTED]> said:



I'm curious as to how others are doing templates for subsections of=20
their site to vary the style and some content.  I was going to do=20
custom resource types but the howto suggests that's not appropriate
and I can see why. How do you do it? Custom pipelines? Logic within
the an XSLT?

I'll take a crack at this one and see if it helps. Our site = (www.hiram.edu) has multiple design templates depending on what level of = navigation you are on. Granted, it's not perfect, but perhaps it'll = give you some ideas.

For the front page, I just created a separate pipeline that points to =
the index.html file and tell it to use a different XSLT file.  Now I =
realize that's kinda silly since by default, the homepage is given a =
doctype of "homepage", so you can use this to your advantage in your =
main pipeline (assuming you are using the default publication as your =
starting point) by creating your new XSLT file to following the naming =
convention for doctypes.

For the secondary pages, we have another template with one XSLT file.  =
The tertiary pages have yet another template, but the only thing that's =
really different is that in the content area, we add a tertiary =
navigation on the right side.  So, I created a custom XSLT file in =
pubname/lenya/xslt/navigation/ that tested whether or not there is more =
deeper levels of navigation underneath the page I am currently on.  If =
not, I set the display of the tertiary navigation to "none" (by =
including a different CSS file) so that the full area of content can be =
used.  If there are more levels, then I include another CSS file where =
that tertiary navigation is not hidden.

So, perhaps, if your templates are setup so that they differ by level of =
navigation, you can create that custom file that checks for the =
navigation, and depending on the results, you send back a <link =
rel=3D"stylesheet" ... /> tag for the CSS file you want.  Hope that long =
explanation helps somewhat.  :)

Jon

Well it's not the utterly coherent prose of your blog articles but it definitely helps :)


I think I just want to use a different presentation XSLT depending where you are in the site hierarchy. It's not so much about the navigation, though that may come up.

Do you have an example of how you match where you are in the hierarchy. I'm still wrapping my head around XPath. Everytime I think I understand it, I see something new that makes me scratch my head.


Sean



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to