Steven,
Attachments can be inherited from parent pages. So if you attach an
image to your Home page, then it will be available to all pages,
layouts and snippets.
Page attachments is a bit fussy: when you ask for a file that doesn't
belong to the current page (or its ancestors) it raises an exception.
It could be dangerous if you were to call <r:attachment
name="image.jpg"/> in a snippet or layout. If that snippet/layout was
called from a page which didn't have "image.jpg" attached, and nor did
any of its ancestors, then an exception would be raised, and the page
would not render. However, if you attached a "image.jpg" file to the
home page, then it would be available to every page in the site, and
the problem above would be avoided.
Of course, you could attach an "image.jpg" file to any section. Then
that section, and all its ancestors would use that file instead of the
one attached to the home page.
Does that make sense? The inheritance mechanism means that you can
treat page attachments in a similar fashion to page parts. When you
look at it that way, it should no longer seem necessary to be able to
attach files to snippets and layouts.
Cheers,
Drew
On 16 Apr 2009, at 21:50, Steven Southard wrote:
You mean because the name is page attachments? I think it'd be
convenient to locate attachments in snippets too. Snippets need
images just as much at pages. If a snippet had images maybe pages
wouldn't need quite as many. I guess, next your going to tell me
layouts don't need attachments either. Sure would be convenient.
Steven
On Apr 16, 2009, at 1:45 PM, Mohit Sindhwani wrote:
Steven Southard wrote:
Why doesn't page attachments show up in snippets?
Because it attaches to a Page?
Cheers,
Mohit.
4/17/2009 | 2:45 AM.
_______________________________________________
Radiant mailing list
Post: Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site: http://lists.radiantcms.org/mailman/listinfo/radiant
_______________________________________________
Radiant mailing list
Post: Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site: http://lists.radiantcms.org/mailman/listinfo/radiant
_______________________________________________
Radiant mailing list
Post: Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site: http://lists.radiantcms.org/mailman/listinfo/radiant