You could replace anything inside those parens with an appropriate
character class... probably [\w-]+ would work.
Sean
Thanks! I know how to write regular expressions. I was wondering if
there was a way to make this more automatic. The DRY-principles
should apply to layouts as well, no? Can anyone think of a way to
reduce the number of places I need to change when I add a new project
blog. Right now I do this:
Create a new child of the root, say "food".
Copy the content from a previous blog, say "cars".
Change some stuff in the page content.
Create an RSS-feed.
Change the Normal layout.
I'd like to find a smarter and less redundant way to do this.
/Martin
http://smpl.se
On 8 mar 2007, at 14.52, Sean Cribbs wrote:
Change the first part of the if_url to look like so:
Posted by on
You can keep chaining on other "categories" with the | character.
Sean
Martin Olsson wrote:
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 <[EMAIL PROTECTED]> wrote: There is one
piece of code in the "Normal" layout that I don't quite understand:
Posted by on
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: [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