Ok, item #1. Unfortunately, this is hairier than you'd think:
1. Pages have an entirely different context than stylesheets and
their tags don't exactly snap in (what exactly is the parent of a
stylesheet? the slug?) Basically, I'd have to rebuild these tags
2. I built a whiz-bang dependency observer that tracks relationships
create a better caching mechanism for these files. This caching
was a core goal of this extension. If I go adding page tags, I
risk breaking the caching (some tags, like the ones you've
specified, are really static tags -- the page they're in only
changes if the tag is changed somehow -- but many of the radius
tags are dynamic) Radiant doesn't know which tags are which and,
so, has to assume the worst -- hence Radiant's 5-minute cache.
So, it's not that it isn't doable, it's just that I want to approach
this very cautiously. I figure that someone's eventually going to come
up with a case that will be so necessary as to make me change this one
but man I'm gonna go kicking and screaming ;-)
Jim Gay wrote:
I was working to move my page based stylesheets into the
styles_n_scripts extension when I ran into a problem.
I'd love to see 2 features of doing stylesheets in pages:
1) support for radius tags from pages
2) page parts (or something like it)
I have one client that is managing the design of the site, but we're
handling the HTML/CSS. So in the stylesheet, I use something like
background: url('<r:find url="/"><r:attachment:url name="logo.png"
/>') no-repeat left top;
This allows them to use page_attachments to change images specified in
the stylesheet without needing to muck about in CSS.
Less importantly, I break out the stylesheet into different parts to
make it easier to manage, but also easier for the client to update.
For example, I'll add <r:content part="colors" /> to the body which is
the part of the stylesheet (page) where all of the colors are
specified. The client can go in and go directly to the colors part and
knows enough to edit the part for particular items in the site. I'll
only put the color information in the colors part so that the extra
CSS declarations don't confuse them.
The reason I found this is because of this
http://dev.rubyonrails.org/ticket/10886 which is fixed in the version
of Rails later than what is currently in Radiant. But my form data was
apparently too big to be saved properly by Rails.
Radiant mailing list
Radiant mailing list