[typo] HTML structure

Gary Shewan gpsnospam at gmail.com
Sat Apr 15 06:27:52 EDT 2006

On 14 Apr 2006, at 15:59, Piers Cawley wrote:
>> I don't understand what you're getting at here ... at all.  And I've
>> tried.
> Bah! You obviously haven't tried hard enough!


> I want to stop every theme and its brother *having* to override
> default.rhtml. It's a 'nice' feature, but we're definitely cracking
> nuts with sledgehammers if we end up overriding default.rhtml just
> because we want to change a stylesheet.
> If we have a default (rails) layout that goes something like:
>   <!DOCTYPE html Blah Blah>
>   <html xmlns="http://www.w3.org/1999/xhtml">
>     <head>
>       <%= render :partial => 'common/html_head' %>
>     </head>
>     <body id="<%= params[:controller].gsub('/', '-') %>">
>       <div id="header">
>         <%= render :partial => 'common/header' %>
>       </div>
>       <div id= "page">
>         <div id="content">
>           <%= yield %>
>         </div>
>         <div id="sidebar">
>           <%= render :partial => 'common/sidebar' %>
>         </div>
>         <br style="clear:both;" />
>       </div>
>     </div>
>     <div id="footer">
>       <%= render :partial => 'common/footer' %>
>     </div>
>   </html>
> And make the various 'common/*' partials overrideable by the theme,
> then we're already in the position that a theme designer can alter the
> structure of the various divs without having to repeat a bunch of
> boilerplate.

The dawn of a new day brings clarity :)

I can see the benefit of that, definitely.  But is it not _almost_  
like doing the same thing as overriding default.rhtml ... 'cept in  
separate files?  For instance, let's say I need to place my own meta  
tags, a custom div and a custom footer.  At the moment that all goes  
in the themes default.rhtml.  So in the future I'd have to put the  
meta tags in 'common/header', and I want the custom div before the  
content so I'd normally place that just before the content is called  
in default.rhtml ... would I place that at the top of 'content'?   
(There would be a 'common/content'?)  The custom work for the footer  
would then go into 'common/footer' - obviously :)  Now that's not  
about CSS.  I haven't even styled any changes yet. But is that right?

>> I'm lost.
>> Is it just me?  Could be ;)
>> I readily agree that something needs to be firmed out though because
>> I'd put money on the fact that nearly every theme in the contest
>> would be broken in trunk now.
> Well, if it uses sidebars, it's broken. And if it wants to use at
> least one of the plugins (can't remember which one) that needs a
> particular javascript included in the header, it's doubly broken.

So yeah ... pretty much every one.  I smell a new contest after the  
release of 4.0


More information about the Typo-list mailing list