miscellaneous suggestions for the next hobix release

William Morgan wmorgan-hobix-is-the-way at masanjin.net
Wed Sep 29 09:44:18 EDT 2004


Excerpts from why the lucky stiff's mail of 28 Sep 2004 (EDT):
> >   * in entries_erb, before <li><+ day_header +></li>, add:
> >       <a name="<%= day.strftime( "%Y%m%d" ) %>"/>
> >     (a calendar plugin would find this useful)
> 
> And check.

After developing said calendar plugin, I realized it's probably better
to do this in day_header_erb. And, at least in Firefox,
<a name="whatever"/> doesn't seem to work work; it needs to be across a
span of text.  So I currently use:

  <a name="<%= day.strftime( "%Y%m%d" ) %>">
  <h2 class="dayHeader"><%= day.strftime( "%A, %B %d, %Y" ) %></h2>
  </a>

> >   * feel free to add the section_map code :)
> 
> What does everyallbody think?  I like it.  Add it?

And it should work for Ruby 1.8.1 now. :)

> See Hobix::Entry#section_id.  A section_link can be built with
> weblog.expand_path( entry.section_id ).

Ah, excellent. I didn't notice this before.

> >   * maybe move the entry_proc code to a class method of Entry, such that
> >     subclasses don't need to replicate it when they call
> >     YAML::add_domain_type()
> 
> Hmm.  Considering.

The only reason I suggest this is that I suspect a popular way of adding
entry types is going to be extending Hobix::Entry, either by adding
a new field, or by just using the different class type to do something
special to those entries.

For example, one idea I played around with was:

  class BannerEntry < Hobix::Entry; end

and I was going to have all BannerEntries displayed at the top of their
corresponding section index page. But then none of the textile stuff
worked until I copied the YAML::add_domain_type stuff with entry_proc
over from entry.rb. (It's been a while since I played around with this
so forgive me if the details are fuzzy---maybe I was doing something
wrong.)

-- 
William <wmorgan-hobix-is-the-way at masanjin.net>


More information about the Hobix-is-the-way mailing list