Forum: Radiant CMS extension question

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Ea577afd9ec6414fdcbaf66ff6f0ad53?d=identicon&s=25 Bill Rowell (Guest)
on 2007-05-25 08:15
(Received via mailing list)
I'm developing another radiant extension that I basically want to be
able to
display a catalog of categories, sub-categories, and items with.  I
want to have to create a page for every one of those, I want it to be
dynamic based on what someone can set up through an admin interface.  I
don't want to lose the power of radiant and its tagging system (like not
being able to use r:title, r:snippet, r:content etc. etc.) by having the
extension be its own application outside of the CMS.  Another
requirement is
the ability to have pretty urls like /catalog/department/shoes/ instead
having query string variables muddying things up.

Has anyone tried to do something like this and had some success that
could share?  I've given this a bit of thought and haven't really come
with a solution I like.
E91bbb5eae81347ed57880eea764c0f9?d=identicon&s=25 Keith Bingman (Guest)
on 2007-05-25 08:29
(Received via mailing list)
I did a tagging extension that works like this. Basically, you set up
virtual pages with the slug as the name for your category. A regex in
the page type grabs the slug from the url and then displays whatever
it is you need. You just need to make some specific tags to display
your categories and their attributes, but you can still use the basic
Radiant tags. I set it up with two virtual pages, a listing page, and
a display page. Listing shows all categories and links to them,
display shows each category.

You can check out my extension at
extensions/metatagging. You may need to check out the assets
extension to make it work, but I hope to change that in  a few days,
but I have been pretty busy for the last few days.

Let me know if you have any questions.

I have an example of this working at Both
the posts and the galleries are based on it.

Keith Bingman
Tel: +49-7731-79838380
Bdf2290f0b1d87cb0853966e7e51606b?d=identicon&s=25 Andrew O'Brien (Guest)
on 2007-05-25 17:06
(Received via mailing list)
I think I'm looking to do much the same thing -- I have a bunch of
database records that I want to output in a uniform way, 1 per page,
all linked under a parent page that lists them.

What I'd come up with recently was to use a combination of the
RecordTags extension
( and virtual pages.
 I haven't implemented this yet, so I can't give you much practical
advice -- it's just the strategy I'm planning on using.  The author of
RecordTags admits that it's pretty alpha, so beware.

Keith: Trying to browse your SVN, I get a login box.  Do you have some
kind of read only access you wouldn't mind giving out to the list?
E91bbb5eae81347ed57880eea764c0f9?d=identicon&s=25 Keith Bingman (Guest)
on 2007-05-25 17:19
(Received via mailing list)
> Keith: Trying to browse your SVN, I get a login box.  Do you have some
> kind of read only access you wouldn't mind giving out to the list?

Whoops, I had the wrong address. There should be a "projects" folder,
first. Not all folders are one, but that one is:

Let me know if that doesn't work.

Keith Bingman
Tel: +49-7731-79838380
839b1e791357ce8dd935c93d4b7a0c9a?d=identicon&s=25 Loren Johnson (lorenjohnson)
on 2007-05-27 00:35
(Received via mailing list)

I've written a Event Calendar extension which pulls events from an
ical subscription and populates them into calendars which each have
an associated "category" and "slug". I then access the different
calendars through a virtual page root node like this: http:// (or more concretely http://

This is very similar to how the ArchivePage behavior in the core code
works. Take a look at that if you haven't already.

I'm releasing a tidied-up version of this EventCalendar extension
here on the list within a day or two so you can use it as another
example then... Actually though, pretty much everything you need is
here between the EventCalendar page type which overrides find_by_url
to, essentially shutting-down further Radiant processing of child
pages, and the <r:calendar... tag which processes the query path

class EventCalendar < Page

   LOGGER = ActionController::Base.logger

   description %{ Create a series of calendar pages. }

   def cache?

   def virtual?

   def find_by_url(url, live = true, clean = false)



tag "calendar" do |tag|
   event_search =
   event_search.category = tag.attr['category'] ||
(@request.parameters[:url][1] if self.class == EventCalendar) ||
   event_search.slugs = tag.attr['slugs'] || (@request.path_parameters
[:url][2] if self.class == EventCalendar) || "all" = tag.attr['period'] ||
(@request.path_parameters[:url][3] if self.class == EventCalendar) ||
    # ... note the @request.parameters[:url][1] and [2] references

Hope that helps,

Loren Johnson
8802b1fa1b53e2197beea9454244f847?d=identicon&s=25 Sean Cribbs (Guest)
on 2007-05-27 17:51
(Received via mailing list)
Looking forward to your extension, Loren.

This topic is locked and can not be replied to.