Over the weekend I added file uploading capability so now you can upload
This is my first stab at using Rails uploading and RJS so I'd really
love any feedback anyone has to offer.
You can get it here (while supplies last):
From the README...
The Styles 'n Scripts extension was an extension requested by John Long
stored in pages.
Using this extension is rather painless. If you can use the rest of
using these additions should feel obvious. There are a couple of things
note of, however.
* The CSS and JS tabs are where you create, edit, and delete
* If you want to reference or otherwise use your script or stylesheet
can be used to inject your CSS or JS code into the page or just render a
link to the file itself. (Click the 'available tags' link when
Page to learn more about these two tags and their options).
* If you really want to get fancy with your CSS and JS files, you can
of the same type. So now you can create a single CSS or JS file that is
made up of sub-files to cut down on server requests and speed up
time -- viola, now Radiant offers asset packaging just like Rails!
caching mechanism is smart enough to keep track of your file's
That's it. Everything else is either too obvious to bother with here or
automagical and/or too top secret to disclose ;-).
WHY CHANGE THINGS?
As John sees it, the pages tab is for storing your main content. (Think
tree view as the list of available destinations for your users. Sure,
-- that augment your pages).
There are a number of interesting benefits gained by this approach:
* CSS and JS files now get designer-level permissions -- not user-level.
* These files are now cached differently. Rather than the 5-minute
on pages, these files can now report to the browser the true
date so we don't have to serve up these files constantly. We can
user's browser caching to work.
* This properly separates the concerns of Pages and Text Assets. (I
understand for the user and easier to develop for.
* Allows extensions to better interact with pages. For example, a search
extension can now safely parse all the pages without search terms like:
"background" returning all your stylesheets.
* Declutter the pages tree view so that it only shows what your
about -- the things they'd aim their browser at (see John's point
* This opens the door for validation, minification and obfuscation of
and stylesheets (I'm thinking that these features belong in their own
extension(s) but they're *much* easier to build now that CSS and JS
Radiant mailing list