On Tue, Sep 30, 2008 at 6:57 PM, Jim Gay <[EMAIL PROTECTED]> wrote:
> On Sep 30, 2008, at 9:25 PM, Joe Van Dyk wrote:
>> Hi,
>> My client wants the ability to pick the banner (a wide image that will
>> be at the top of the page) for each page.  They should be able to pick
>> a different banner on each page, and if one's not picked, it defaults
>> to the parent page's banner.
>> What's the best approach for doing this?
> Depends on how you are managing the images.
> With plain ol' Radiant features, you can set the banner image in a page part
> called "banner" on the home page.
> In the layout you would do <r:content part="banner" inherit="true" /> which
> would display the current page's banner part, or if none exists, display the
> parent page's banner (or parent's parent, and so on). If they want to use
> the home page image, then they don't add the banner part, otherwise they do.
> You could also use page_attachments and have your client attach an image
> called "banner" and then put <r:attachment name="banner" /> in the layout
> which would inherit it's parent's banner if none is found.
> Or, if you want it to be even simpler for your client, you could write an
> extension that provides a list of images to choose from on each page and
> allows them to select the image. That would leave less room for them
> screwing it up, but in general I've found that my clients easily understand
> inheritance and page parts.
> If you go that route, inheritance is simple. Take a look at the way it's
> handled in the standard_tags
> http://github.com/radiant/radiant/tree/master/app/models/standard_tags.rb#L266

Thanks.  I was thinking of having them sftp images up to a 'banner'
directory on the server.

If I write an extension, how do I get it to insert html into the page
create/edit form?
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

Reply via email to