nurilized wrote:
good work, i appreciate your effort.

i dont know pitfalls.. but it would be better if we could throw csses and
javascripts between head tags no matter where they are called from..

Not sure I follow you. What do you mean by "no matter where they are called from?"

secondly, looks like there is almost no difference between inline and other
way.. in inline mode it adds html comment tags other way just include the
way i write it if i dont add <script /> tags it just dumps everything to the
page.

it must wrap codes if there is no header tag

Yeah, the as="inline" is a bit weak and I've already got a change to remove the commenting and, instead put:
<script ... >
// <[CDATA[
 your code here
//]>
</script>

to ensure XHTML compliance (probably overkill for stylesheets but no harm either).

The thought behind offering the inline version was that Pages are accessible to your everyday users -- not just admins or developers. So they might not know how to safely wrap their scripts in CDATA (I goofed it even) or they may not be sure of the desired content-type so the tag automagically does it for them.


-Chris
On 5/28/08, Steven Southard <[EMAIL PROTECTED]> wrote:
I must admit that "assets that don't happen to include images"  is a bit
long.  I kind of like "text assets".  That kind of opens it up to include
other types of files that people may want to put there like .xml or maybe
even a .as file.  One thing that would be nice about putting them together
is that you could then make use of a "file type" combo box.  That would fill
out the page a bit and give a person a little more to do.  Also those lovely
icons would have a chance to help you sort out your file types.

-Steven

On May 27, 2008, at 8:50 PM, Chris Parrish wrote:

 Thanks for the feedback Steven.  I'm really interested in making this a
usable extension for all.

I always used pages for my js and css files too and, like you, never had
more than a handful of each -- it wasn't much of a bother to do.  So, when
John first mentioned the idea to me I really only saw one or two valid
reasons for such an extension (for instance, I found it difficult to explain
to users why they had to create a blank layout for a stylesheet just to set
the content-type).

Now that I've been working on it, I see *many* good reasons to go this
route (my current favorite is the server and browser caching benefits -- I
*love* the idea of not having to expire and reserve all stylesheets and
javascripts every 5 minutes).

As to the multiple tabs, yeah, I'm with you.  Originally I think John
envisioned something like an "Assets" tab where CSS, JS and image files
could all reside but Radiant hasn't settled on an image asset approach just
yet.  And without images, what do you call the tab -- Text Assets?  CSS &
JS?  Assets-That-Don't-Happen-To-Include-Images?  Actually, my original
mock-up for this extension had one tab (called "Files") but I still kind of
choked on that vague name.

Anyway, for now, John just suggested keeping two tabs and waiting to see
how things progressed.  In the interest of minimizing tab space, I did
choose to name them CSS and JS instead of Stylesheets and Javascripts.
 Plus, your standard-level users never see the tabs anyway so it looks clean
to them.

I certainly welcome any ideas/suggestions here. Its a fairly
straightforward design but nothing's set in stone.

-Chris


Steven Southard wrote:

I just tried out your extension.  Nice idea.  I've always liked how the
css file was exposed under pages but I really hadn't thought of it having
it's own section either.  Also, I've always wondered where to put my js
files.  I usually just tucked them in the javascript folder and referenced
them. This gives them a proper place.   I mostly only use one stylesheet per
website so it seems a bit overkill.  Not to be stingy with my tabs, but I
think I'd like it better if the css and js pages were both under one tab.
I'm looking forward to seeing what becomes of this extension.

Thanks,

Steven



On May 27, 2008, at 1:28 PM, Chris Parrish wrote:

 nurilized 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

 I just released version 0.3 of this extension and you will now find
tags to do just this. For instance:

<r:stylesheet name="my_stylesheet" />

produces:

your stylesheet content

Or, if you want to be more fancy, try:

<r:stylesheet name="my_stylesheet" as="inline" />

and get:

<style type="text/css">
<!--
your stylesheet content
-->
</style>

The same works with the <r:javascript> tag.

-Chris
_______________________________________________
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

_______________________________________________
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

Reply via email to