[Radiant] Simple blog too complex: what does this code do?

Martin Olsson martin at smpl.se
Thu Mar 8 07:49:59 CST 2007


So what do I do to make it work with a "multi-blog" site? I need  
something that matches /blog/YYYY/MM/DD, /blog/YYYY/MM/DD, /car/YYYY/ 
MM/DD, and I don't really want to have to change it or add to it  
every time I add a new "project blog".

Regards,
Martin Olsson
http://smpl.se




On 8 mar 2007, at 11.07, Mislav Marohnić wrote:

> On 3/8/07, Martin Olsson <martin at smpl.se> wrote:
> There is one piece of code in the "Normal" layout that I
> don't quite understand:
>
> <r:if_url matches="^/articles/\d{4}/\d{2}/\d{2}/.+"><r:unless_url
> matches="-archives/$"><p class="info">Posted by <r:author /> on
> <r:date /></p></r:unless_url></r:if_url>
>
> It's simple really - you read it out like English :)
>
> If the current URL starts with "/articles/YYYY/MM/DD" (generic blog  
> format), print out "Posted by [author] on [date]" in a paragraph.  
> However, the URL must not end in "-archives/". This is because  
> archives are pages with that URL format, too, but you don't want  
> them to look like blog posts.
> _______________________________________________
> Radiant mailing list
> Post:   Radiant at lists.radiantcms.org
> Search: http://radiantcms.org/mailing-list/search/
> Site:   http://lists.radiantcms.org/mailman/listinfo/radiant




More information about the Radiant mailing list