[Radiant] Best Practices for multiple Layouts that have slight variations

Jim Gay jim at saturnflyer.com
Wed Jan 24 09:48:38 CST 2007


Michael,

Try <r:if_url matches="/your_location/">

You could create rules based upon the url to change the content  
within one layout.

If, however, you wanted to edit the layout based upon an individual  
page and not based upon the URL, then your solution is probably the  
most flexible.
I'm no expert though, so possibly someone else will chime in.

-Jim

On Jan 22, 2007, at 12:44, Michael Jones wrote:

> Hello-
>
> I was wondering if there were some tips on the 'best' way to approach
> this problem.
>
> I have a site each of the 5 top level pages have the same format but a
> different:
> * top image
> * color scheme
> * tag line
>
> I was thinking I would:
> * create Snippets for the common elements
> * create Layouts for the 5 types and include the common Snippets
>
> This is not ideal because there is still alot of repition in the
> layouts, it's not very DRY.
>
> Ideal I would create a 5 data structures that encapsulate the
> differences and have 1 Layout that pulls in the correct data to create
> the required unique Layout.
>
> Is there someway to accomplish this? Or is there a better approach?
>
> Thanks-
> Michael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.radiantcms.org/pipermail/radiant/attachments/20070124/2f59ee88/attachment.html


More information about the Radiant mailing list