We have a Tag Library that will write out a value of a named attribute, assume the value of the attribute is the path to a JSP and include it, and others that let us do conditional logic (if attribute "Foo" has a value of "bar" do this else do that).
Andrew and I have been discussing this, and he raises a good point: "if we make the data accessible to tags (other than conditionals), these metadata do start acting more as parts/content." Over the weekend, the sprinters had a long debate regarding the use of these page attributes and how they differ from page content, and I think the resolution was that attributes should be used as filters, or to trigger behavior on individual pages, but stop short of being treated as content. To that end, I am envisioning a set of tags that acts on attribute _types_ rather than attribute content, e.g. a conditional tag for booleans; if_before/if_after for datetimes; and so on.
Right now, page parts are inheritable if the usage of the part says so, which is to say that the Radius tag has an attribute called inherit. In our application, we did it the other way.
My inclination is to follow Radiant convention, unless someone can convince me otherwise. (I'm a pushover, so have at it.)
If I set a "masthead_image" attribute on page /products/widgets to "widgets.gif" then every page in /products/widgets gets that value
To me, this suggests the possibility of (ab)using attributes as foreign keys (e.g. to an asset stored in another table) as opposed to literals. We wrote an extension for a client that attempts to automagically draw some associations based on introspecting a schema similar to what we're using here, and I still have nightmares about dark things shuffling forth from join tables. So it's not something I was planning on attacking on this first pass, but I definitely see a strong use case for it and if anyone has a strong pattern for accomplishing this, I'd love to hear about it.
j _______________________________________________ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant