Re: [Radiant] Best way to refer to a stylesheet?
John and Catherine Allen wrote: Mohit, Thanks, yes: your excellent tutorial was my starting point. But I was having trouble because my Radiant site was in a subdomain. Now I know several ways to handle this. John Thanks John, I've noted your comment about the subdomain and will roll that in somewhere. By the way, the method in my tutorial should work even in a subdomain (not a directory but a subdomain). After all, the method there just uses basic Radiant for all the work. Let me know if you have the time again and can check what problem you're noticing. But I did notice that a few methods have been proposed. Cheers, Mohit. 6/10/2008 | 9:16 AM. ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
Re: [Radiant] Best way to refer to a stylesheet?
Mohit, Thanks, yes: your excellent tutorial was my starting point. But I was having trouble because my Radiant site was in a subdomain. Now I know several ways to handle this. John Mohit Sindhwani wrote: John Allen wrote: This has to be a really basic question, but despite reading the documentation and many mailing list posts, I still don't get it... For stylesheets which are stored in the database 1) In a layout, what is the recommended way to refer to a stylesheet ? 2) In a page, what is the recommended way to refer to a stylesheet ? My stylesheets work fine when I refer to them as files in the filesystem, but not when they are in the database. John Hi John If you have your stylesheet set up as a page in Radiant, you need to know its slug. Once you know the slug, you can render it with something like this in your layout: | This requires you to have a stylesheet under the root of your site in Radiant with a slig of styles.css. | This tutorial of mine very briefly touches on it: http://notepad.onghu.com/2007/5/26/hello-world-using-radiant-cms Cheers, Mohit. 6/9/2008 | 2:35 AM. ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant -- John Allen Bofferdange, Luxembourg [EMAIL PROTECTED] http://allenlux.dyndns.org ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
Re: [Radiant] Best way to refer to a stylesheet?
John and Catherine Allen wrote: Chris, Thanks - in fact I had successfully installed the Styles 'n Scripts extension but was not clear about how to make use of it. I'll try the tag approach. John Both the and tags have explanations if you click on the "available tags" link on the "Edit Page" screen. These descriptions should be self explanatory -- well, I understand them, anyway ;-) It's also worth noting that the SnS extension uses default locations for your stylesheets and javascripts (they are /css & /js respectively) but you and your users never need to know these locations to use the tags. Just fill out the name of your stylesheet and the rendered output will include the full path automatically. You can also change the default settings (including these asset directories) via the custom_settings.rb file. Let me know if you have any troubles -- I want to make that extension as usable as possible for the community. -Chris ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
Re: [Radiant] Best way to refer to a stylesheet?
John and Catherine Allen wrote: This has to be a really basic question, but despite reading the documentation and many mailing list posts, I still don't get it... For stylesheets which are stored in the database 1) In a layout, what is the recommended way to refer to a stylesheet ? 2) In a page, what is the recommended way to refer to a stylesheet ? My stylesheets work fine when I refer to them as files in the filesystem, but not when they are in the database. John Hi John If you have your stylesheet set up as a page in Radiant, you need to know its slug. Once you know the slug, you can render it with something like this in your layout: | This requires you to have a stylesheet under the root of your site in Radiant with a slig of styles.css. | This tutorial of mine very briefly touches on it: http://notepad.onghu.com/2007/5/26/hello-world-using-radiant-cms Cheers, Mohit. 6/9/2008 | 2:35 AM. ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
Re: [Radiant] Best way to refer to a stylesheet?
Chris, Thanks - in fact I had successfully installed the Styles 'n Scripts extension but was not clear about how to make use of it. I'll try the tag approach. John Chris Parrish wrote: I see that Casper already sent a reply but I thought I'd mention the Styles 'n Scripts extension here since it was made to make things like this simpler. You would simply use the or tag in your Page/Layout/Snippet to render the thing you want: generates: while... generates: /css/my_stylesheet.css Of course the /css directory in the examples is the extension's default but you can change that to whatever you want. You can also use these tags to pull the content from a stylesheet of javascript into your document's section. -Chris John Allen wrote: This has to be a really basic question, but despite reading the documentation and many mailing list posts, I still don't get it... For stylesheets which are stored in the database 1) In a layout, what is the recommended way to refer to a stylesheet ? 2) In a page, what is the recommended way to refer to a stylesheet ? My stylesheets work fine when I refer to them as files in the filesystem, but not when they are in the database. -- John Allen Bofferdange, Luxembourg [EMAIL PROTECTED] http://allenlux.dyndns.org ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
Re: [Radiant] Best way to refer to a stylesheet?
I see that Casper already sent a reply but I thought I'd mention the Styles 'n Scripts extension here since it was made to make things like this simpler. You would simply use the or tag in your Page/Layout/Snippet to render the thing you want: generates: while... generates: /css/my_stylesheet.css Of course the /css directory in the examples is the extension's default but you can change that to whatever you want. You can also use these tags to pull the content from a stylesheet of javascript into your document's section. -Chris John and Catherine Allen wrote: This has to be a really basic question, but despite reading the documentation and many mailing list posts, I still don't get it... For stylesheets which are stored in the database 1) In a layout, what is the recommended way to refer to a stylesheet ? 2) In a page, what is the recommended way to refer to a stylesheet ? My stylesheets work fine when I refer to them as files in the filesystem, but not when they are in the database. John ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant