Enhancing page model with acts_as_taggable

Hi list,

I was wondering if anybody is using acts_as_taggable(_on_steroids) on
their
pages yet?

I had acts_as_taggable running, a long time ago, but the main problem
is that Radiant uses the “Tag” namespace for the, well Tags (the
radius ones, not organizatonal ones). I got around this by hacking it
a bit a renaming the tags to Metatags. Worked fine.

More recently I have been using has_many_polymorphs, which seems to
be a much better replacement for tagging that the various newer
versions fo acts_as_taggable. It comes with a nice tagging generator
and I spun that out into a small extension, which unfortunately broke
with 0.6.4. I have not looked into it, as this was just a small
personal project and I had people breathing down my neck for other
more important things…

If you would like to play with the code, let me know, I will package
it up.

keith

I was halfway through with adding acts_as_taggable_on_steroids, I think
the
tag handling in radiant has changed since your attempt, 'cause i had no
problem with the namespace. I hadn’t read about has_many_polymorphs yet,
seems like a good solution too.
I’d sure be glad to try and fix your extension

Benny

I had acts_as_taggable running, a long time ago, but the main problem
is that Radiant uses the “Tag” namespace for the, well Tags (the
radius ones, not organizatonal ones). I got around this by hacking it
a bit a renaming the tags to Metatags. Worked fine.

More recently I have been using has_many_polymorphs, which seems to
be a much better replacement for tagging that the various newer
versions fo acts_as_taggable. It comes with a nice tagging generator
and I spun that out into a small extension, which unfortunately broke
with 0.6.4. I have not looked into it, as this was just a small
personal project and I had people breathing down my neck for other
more important things…

If you would like to play with the code, let me know, I will package
it up.

keith

On Jan 4, 2008, at 5:24 PM, Benny D. wrote:

Hi list,

I was wondering if anybody is using acts_as_taggable(_on_steroids)
on their
pages yet?


Radiant mailing list
Post: Radi…http://groups.google.com/groups/unlock?msg=d3c43bdfaf8247c6&_done=/group/radiantcms/browse_frm/thread/110e8a3c68fb3fa6%3F
@lists.radiantcms.org

“Benny D.” [email protected] writes:

Hi list,

I was wondering if anybody is using acts_as_taggable(_on_steroids) on their
pages yet?

No, but I’ve started something similar (code is still very alpha) that
parses a page part as a YAML hash, indexes this and provides tags for
accessing it. The basic idea is to allow any arbitrary structured
data to be applied to a page in a simple way.

So, for example, you’d create a new page part called “meta” which
would contain something like:

tags: ruby,coding,web_dev

or even something more complex like the data for an hcalendar:

id:         apachecon_europe_2008
summary:    ApacheCon Europe 2008
start_date: April 7
end_date:   April 11
dtstart:    20080407
dtend:      20080411
location:   Movenpick Hotel, Amsterdam
url:        http://eu.apachecon.com
description: >
  ApacheCon is a week of open source goodness straight from the
  source of the Apache Software Foundation, featuring 15 intense
  training classes over two days followed by three days of more
  than 50 sessions by the creators of open source software such
  as the Apache webserver, Tomcat, Lucene, Wicket and more.

I can then access this as a tag like this:

<r:meta  key="tags" />

I’m now working on a controller that would act as an index for this
meta data:

http://example.com/{key}/{value}
                     ^      ^
                     |      returns all pages with this key:value
                     returns a list of all values for the key

Anyway, I’m still just playing around with this and I’m not convinced
yet if it’s a good idea, but it could certainly be used to (1) do
tagging and (2) enhance the page model without any coding.


J Aaron F. jadetower.com [US] +1 724-964-4515
馮傑仁 cubiclemuses.com [HK] +852 8123-7905