[prev in list] [next in list] [prev in thread] [next in thread] 

List:       bricolage-general
Subject:    Re: Changing the content divs on a category basis
From:       Matt Rolf <rolfm () denison ! edu>
Date:       2007-08-14 13:42:06
Message-ID: 9B6174F0-6719-41BC-9C3D-1316E88BAEC1 () denison ! edu
[Download RAW message or body]

Thank you everyone who responded.  We ended up following along with  
Dawn's suggestion.


On Aug 9, 2007, at 11:00 PM, Dawn Buie wrote:

>
> On 9-Aug-07, at 3:42 PM, Matt Rolf wrote:
>
>> Right now,  our HTML autohandler calls a utility template which  
>> sets up the initial content divs for the site.  We would like to  
>> customize the number of content divs based on category.  For  
>> example, if we have a web app where we don't want a side nav, we'd  
>> like to drop the side nav and associated content div in the  
>> category where that app lives.
>
> So are you saying you might want to have say a right side column  
> sometimes - if there is content for that space, and when there is  
> no content in the right column area you want your middle column  
> (main content paragraphs) to stretch across the page?
>
> If so there are many ways you could do that. One way would be to  
> use a style sheet to assigns different widths or floating  
> attributes to the middle column depending on if there was content  
> in the right column.
>
> To get the correct style declarations in your bricolage templates  
> you'd want to test what category you were in, if current story  
> category equals 'news' then the middle column div in mason might  
> look like
>
> <div class="middle <% $category %>"> which would be output as <div  
> class="middle news>">
>
> Or perhaps you do a test to see if there are any right sidebar  
> elements associated with this story, if there are
>
> <div class="middle narrow">
>
> if there aren't
>
> <div class="middle wide">
>
>
>>
>> One solution is to simply have a different autohandler for web  
>> apps, but I don't think that solves the problem.  For one thing,  
>> we'd like flexibility, and I'd like to avoid creating new output  
>> channels whenever we've got a new web app that needs a slightly  
>> different look.
>
> I output elements in my sidebars into php code, and I put them in a  
> directory on my front end server called /inc/. These do use a  
> different output channel just for php includes. But that's ok. I  
> don't see why each webapp would need a different OC. You can  
> differentiate the urls for the webapps (if I'm understanding you  
> correctly)  by giving them different slugs, but still using the sam  
> OC.
>
> That way I use php includes to put those reusable bits of php where  
> ever I want them in my pages.
>
> People also use server side includes.
>
>
>>
>> After thinking about it, I thought maybe we could create an  
>> element template in the root category called "content" which would  
>> get called by either the autohandler or associated utility  
>> template.  This would have a default content div setup.  If we  
>> wanted to change it on a category basis, we could then make a new  
>> element template in that category which would override the root  
>> category template.  But, Is it possible to call an element  
>> template without there being an element in the story?  I'm not  
>> sure it is.
>
> Sorry I'm not following this part.
>
>
>>
>> At any rate, I feel like this is possible, but there's something  
>> that's just not connecting.  If anyone has suggestions, it would  
>> be most appreciated.
>
> I'd write more if I was sure I was on the right track.
>
> Dawn
>
>>
>> Also, for what it's worth, Denison University has spent the summer  
>> migrating to Bricolage and we are planning to roll out our new  
>> site before the end of the month. Fingers crossed.
>>
>> Thanks,
>>
>> Matt
>>
>

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic