[Radiant] And what happened to the clear page cache button?

Sean Cribbs seancribbs at gmail.com
Sun Jun 8 11:04:24 CDT 2008


If you're using the built-in tags, like <r:url /> and <r:link />,  the 
relative path issue will be handled properly.  For those of you 
developing tag libraries, you can take advantage of the relative_url_for 
method that is in StandardTags:

relative_url_for('/mystyles/new.css', tag.globals.page.request)

used in the context of the example would produce 
'/radiant3/mystyles/new.css'.

Sean

Casper Fabricius wrote:
> Yes, well that's because you are running radiant in sub-directory; at 
> http://allenlux.dyndns.org/radiant3/ rather than  
> http://allenlux.dyndns.org/. Rails applications are generally expected 
> to run in their own subdomain, and radiant is no exception. It is 
> definitely possible to run it in a sub-directory, but then you have to 
> aware at things like that.
>
> I'd recommend using the absolute path for the css file in your layout, 
> though:
> <link rel="stylesheet" type="text/css" 
> href="/radiant3/mystyles/new.css" />
>
> Cheers,
> Casper
>
>
> On 08/06/2008, at 0:49, John and Catherine Allen wrote:
>
>> Casper Fabricius wrote:
>>> Yes, that's right, John. Clearing of the page cache is done 
>>> automatically upon changes.
>>>
>>> With regards to your stylesheet question, I tend to just write a 
>>> standard <link> tag, referring to the slug of the stylesheet. For 
>>> instance:
>>>
>>> <link rel="stylesheet" href="/css/standard.css" type="text/css" 
>>> media="screen" />
>>>
>>> Here I have a hidden page with the slug of "css", and below that, I 
>>> have a stylesheet page with the slug set to "standard.css".
>>>
>> Casper,
>>
>> Thanks, that pointed me in the right direction at last. I was getting 
>> confused between the Radiant "path", made up of slugs, and the 
>> filesystem path.
>>
>> However, on my test site it did not work at first. After looking at 
>> the Apache error logs, I tried omitting the leading slash, and now it 
>> works fine.
>>
>> To be concrete:
>>
>> Test page: http://allenlux.dyndns.org/radiant3/hello_world
>>
>> Working version: the layout contains this reference:
>> <link rel="stylesheet" type="text/css" href="mystyles/new.css" />
>> where "mystyles" is the hidden page as you suggest in your message.
>>
>> Non-working version:
>> <link rel="stylesheet" type="text/css" href="/mystyles/new.css" />
>> doesn't work (it seems to be looking for a non-existent filesystem 
>> folder
>> <DocumentRoot>/mystyles/
>>
>> John
>>
>>
>>>
>>> On 07/06/2008, at 15:35, John Allen wrote:
>>>
>>>> Another beginner question:
>>>>
>>>> The older (?) Radiant documentation refers to a "clear page cache" 
>>>> button on the admin page.
>>>>
>>>> My Radiant 0.6.7 sites don't have this button - I am right in 
>>>> thinking this is because Radiant now automatically clears the page 
>>>> cache when something is changed in the database?
>>>>
>>>> John
>>
>>
>> -- 
>> John Allen
>> Bofferdange, Luxembourg
>> allen at vo.lu
>> http://allenlux.dyndns.org
>>
>> _______________________________________________
>> Radiant mailing list
>> Post:   Radiant at radiantcms.org
>> Search: http://radiantcms.org/mailing-list/search/
>> Site:   http://lists.radiantcms.org/mailman/listinfo/radiant
>
> _______________________________________________
> Radiant mailing list
> Post:   Radiant at radiantcms.org
> Search: http://radiantcms.org/mailing-list/search/
> Site:   http://lists.radiantcms.org/mailman/listinfo/radiant
>



More information about the Radiant mailing list