Peter Degen-Portnoy said the following on 01/13/2010 11:38 AM:

> 
> So, the question is, what clever solutions have you used to expand the Admin
> functionality for your users?  Is there another approach that we¹re missing
> that would be more elegant?  I¹d appreciate your warnings and
> encouragements.  :-)
>

I think you're making it too complicated.

First, I've NEVER needed the nested-layout.  I always use new Layouts.
I usually have three or four (or more)(separate) Layouts for a site, one
for the front page, one for normal pages and a couple for special pages.
 Sometimes I have what amounts to "three column", aka 'two sidebars'.
Sometimes its one column.

I'd be hard pressed to imagine why I'd need a 'nested' Layout.

The Layouts are all VERY heavy on snippets.
The overall 'look and feel' is made consistent by the use of CSS and
snippets.  Any Layout is heavy on those snippets, defining the header,
banner, logos, key elements like menus, footers and copyright notice.

I always install "Conditional Tags" so that I have
<r:if> and <r:unless> (and <r:puts>) tags to add to the Snippets, and
Layouts.   Some pages might need markers: there's another extension that
allows for the variables.

That being said, I can usually get a lot of the conditions done with
things like
    <r:if_ancestor_or_self />
for different parts of the hierarchy.

The other thing I rely on heavily is constructs like

  <r:if_content part="extended2">
       <div id="extended2">
         <r:content part="extended2" />
       </div> <!-- end extended2 -->
  </r:if_content>

Why the <div>?  So I can have a stylesheet reference for it!
How else do you get the consistent 'look and feel'?

I also rely heavily on inheritance.

    <div id="sidebar">
        <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 -->

Again, the <div> for the CSS.

The "inherit" means that each section can have its own 'basic' sidebar.
The line without the 'inherit' is the page-specific part of the sidebar.

Of course this is a snippet, and the different Layouts can put it at the
left or the right as they choose :-)

I'm sure you can see how this principle can be generalized.

Now add some conditionals to that ....

You've really not stated your problem in terms of what you're trying to
ACHIEVE.
Instead you've told us about what you are trying to DO, the mechanics.
I'm fairly confident that if I knew what you were trying to ACHIEVE I
could manage it with the techniques I use regularly, without making it
so rococo.

If you want to examine this further, please feel free to contact me.
I need some distraction from doing my taxes :-)

-- 
A generation which ignores history has no past and no future.
    Robert Heinlein (1907 - 1988), The Notebooks of Lazurus Long
_______________________________________________
Radiant mailing list
Post:   [email protected]
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

Reply via email to