Pure CSS Flexible Layout Possible with Smarty Templating?

Skinning and designing Serendipity (CSS, HTML, Smarty)
Post Reply
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert »

When I made Ladybug, I wanted to do an all-CSS source-ordered layout. It worked, too. I had to get a little creative to account for the possibility that I might not have any particular side column, but I got it.

Ladybug also uses fixed-width sides with a fluid center. I'm not sure how they managed the full-height columns, but that's cool.

It's not that difficult to accomplish anything, with Smarty templating. You basically modify the index.tpl to link your stylesheets, then call the appropriate functions at the appropriate places.

There is no header function; we basically write our own and include the hompage link ($serendipityBaseURL) and the link titles ($head_title and $head_subtitle). You could include anything you like.

The left and right sidebars are created by calling {serendipity_printSidebar} with side="left" or side="right". Again, you could put that anywhere you liked.

The blog content is in the variable $CONTENT. That's #col_a in your example.

The footer (if any) is printed by calling {serendipity_hookPlugin hook="frontend_footer"}.

Tah-dah! The layout you've been looking for.

Incidentally, is this a variant of the Jello Mold layout? I haven't had the opportunity to examine that one in detail, but it sure looks interesting.
Judebert
---
Website | Wishlist | PayPal
carl_galloway
Regular
Posts: 1331
Joined: Sun Dec 04, 2005 5:43 pm
Location: Andalucia, Spain
Contact:

Post by carl_galloway »

Hi all,

Could I seek clarification on a point in judeberts reply, the {serendipity_hookPlugin hook="frontend_footer"} I thought was a legacy of the past (support for older versions of s9y), if this isn't the case, how do I edit the content of footer so that this piece of code will print it. Is this achieved in admin suite somehow, or does this open a smarty template file, if so how is it named?

Cheers
Carl
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

That frontend_footer plugin is just used for emitting HTML code specified in Page Nugget plugins.

So not from a Smarty file, but coming from a plugin.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
carl_galloway
Regular
Posts: 1331
Joined: Sun Dec 04, 2005 5:43 pm
Location: Andalucia, Spain
Contact:

Post by carl_galloway »

Ah, so if I want a footer for a theme design I still need to hard code the html, thanks Garvin.

Carl
carl_galloway
Regular
Posts: 1331
Joined: Sun Dec 04, 2005 5:43 pm
Location: Andalucia, Spain
Contact:

Post by carl_galloway »

Rob, great effort. I for one will be very keen to dissect your work and see what we can do with it.

Carl
Post Reply