sites with URL paths
William Morgan
wmorgan-hobix-is-the-way at masanjin.net
Fri Sep 17 16:48:14 EDT 2004
Excerpts from why the lucky stiff's mail of 17 Sep 2004 (EDT):
> Alternatively, I could have the @link loaded as a URI object. In
> which case, you could use:
>
> <%= weblog.link.path %>/sidebar.html
Either way works for me. A related issue: I've been using the following
in local.rb:
class Entry
def category
self.id.gsub(/\/[^\/]*$/, "")
end
def category_link
self.link.gsub(/\/[^\/]*$/, "")
end
end
which allows things like:
posted to <a href="<%= entry.category_link %>"><%= entry.category %></a>
So it might be worthwhile extending that idea to Entry objects. (I'm
sure the dark secret of my Perl heritage is showing at this point.)
--
William <wmorgan-hobix-is-the-way at masanjin.net>
More information about the Hobix-is-the-way
mailing list