Joel Oliveira said the following on 06/23/2012 08:35 AM:
> Hi everyone - 
> Looking for some feedback on how to best tackle this. 
> There are often some sections of a site repeatedly used through (almost)
> all pages - header, footer, sidebar for example.  These sections
> sometimes have multiple page parts.  Example: a header might have a
> mission statement and a photo, a footer might be something of a "super"
> footer with lots of often changed page parts. 
> My question is:  Do you create a few "global" pages under the homepage
> with those page parts, and just hide them from generated navigation (if
> you do so)?  I've previously gone in that sort of direction. For a
> further contrived yet explicit representation:
> Homepage
> - Global header  (with 2 page parts)
> - Global footer  (with 3+ page parts)
> - Global Sidebar (with 4+ page parts)
> ...
> - About
> - Blog
> - Contact
> My thought on this is that it smells a bit.  It just feels wrong. Those
> aren't "pages".  So, I ask you, the brilliant denizens of the RadiantCMS
> mailing list - how do you approach this?
> If there were only a few things here and there, and they were just text,
> then I could put them in as settings, but that's got its own odoriferous
> properties.

I solved this problem very simply.

First: I make heavy use of the Layout to include what you say ate
"global" parts, only those are in my root page, the "home".

All those have 'inherit="true"' set so that any local page or subsection
can override and make it section or page specific

My header and my sidebar have variant parts that depend where on the
site they are.  They vary according to section.

I use two mechanisms for this.

The first is that I can control what foes into the HTTP header, such as
the CSS.  For this I have a layout that lets me drag in new 'stuff'; the
'stuff' usually being CSS.  With this I can alter the look, the colour
of a subsection away from my global settings.

This too has 'inherit="true"' so that each subsection inherits the 'look
and feel'

Now, about your sidebar.  My layout template has something like this

<div id="sidebar">
        <a class="hide" href="#top" accesskey="1">Top of page</a>
        <r:snippet name ="site-menu" />
        <r:content part="sidebar-hi" inherit="true" />
        <r:content part="sidebar" inherit="true" />
        <r:content part="sidebar-page" />
        <r:content part="innerlinks" inherit="true" />
        <r:content part="sidebar-low" inherit="true" />
</div> <!-- end sidebar -->

What does that do?

Will at the top of the sidebar is the site-wide menu.  yes its CSS may
be over-ridden as described above, but its content, the 'home' button
and the buttons for the sections are fixed.

There is an optional page-specific section of the sidebar.  You don't
have to create that page part.

The other parts, hi, low and the sidebar, are all inherited.
If the section head defines them then by having that page part they will
inherit that, otherwise they will inherit the global page part from the
head of the tree.

The 'inner-links' is interesting in that it is a way of determining and
displaying the siblings of this page and other interesting links.  The
'global' value has a lot of "if" bit so that it only works in a suitable
context, not at the home page or anywhere that would have it displaying
just a copy of the site wide menu.  Of course it can be over-ridden on a
page or section basis.

The point I am trying to make here is that there is no need for you
"global' gave.  All those value can bee in your root page and you use
the 'inherit="true"' to propagate  those down until you need to
over-ride them.

Yes this does require a but more thought and planning, but I've found
that once you make that step its immensely powerful and one of the great
joys of working with Radiant.

Again: There is no need for those pages off to one side to hold global

Yes you can hide things from navigation with a custom menu but there is
no need to do so for what you are describing.

If you need details on this contact me off list :-)

Getting into a patent battle with IBM is right up there with starting a
land war in Asia

Reply via email to