I played around with the idea of creating an <r:stylesheet> and
<r:javascript> tag or even enhancing the <r:content> tag to let you add
stylesheet/javascript content in addition to page part content.
The problem is that in either case you have to specify which file you
want (either explicitly or by first setting up a context to that item)
so why not just manually type it and save the noise of yet another
radius tag.
This case, however, has me thinking the other way. (Plus the other
benefit that your users only need to know the name of the script or
stylesheet and not their full path -- my tag would build that).
I'm going to be putting out a new rev shortly -- it would be simple to
add a <r:stylesheet> and <r:javascript> tag.
I'd certainly welcome other ideas as well.
-Chris
nurilized wrote:
hmm, thats nice
but it can be good to inject css/js files from body part inside head
thank you
On 5/20/08, Rufo Sanchez <[EMAIL PROTECTED]> wrote:
is there any way to call js/css files from anywhere of the page/layout?
suppose, i use one template and many subpages?
but i use different/extra css/js files on subpages (and also common),
for
example i will use accordion script on a subpage and putting this on
template or on header snippet is nonsense
so i am looking for a way to call these files from inside page/layout
The way I usually do this is to put a content part in my layout's
header called "head-meta" that appears in the header, e.g.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
...other header stuff ...
<r:content part="head-meta" />
</head>
Then you can just add a part to the page called (what else) head-meta
and add whatever page-specific Javascript, CSS, meta tags, etc. you
might want.
Hope this helps!
Rufo
_______________________________________________
Radiant mailing list
Post: [email protected]
Search: http://radiantcms.org/mailing-list/search/
Site: http://lists.radiantcms.org/mailman/listinfo/radiant
_______________________________________________
Radiant mailing list
Post: [email protected]
Search: http://radiantcms.org/mailing-list/search/
Site: http://lists.radiantcms.org/mailman/listinfo/radiant
_______________________________________________
Radiant mailing list
Post: [email protected]
Search: http://radiantcms.org/mailing-list/search/
Site: http://lists.radiantcms.org/mailman/listinfo/radiant