[Silva-general] navigation by tags/metadata

Andy Altepeter aaltepet at altepeter.net
Sat Dec 5 05:16:53 CET 2009


[sending again, as I didn't see it hit the list]

Hi Bernard,

I've thought a lot about alternate navigation methods.  I think some cms's 
call them "alternate taxonomies".  I don't think Wim's suggestion is quite 
what you're looking for.  Your thoughts of using a SilvaMetadata field are 
right on target. The challenge is knowing your taxonomy ahead of time.  If you 
want a flat taxonomy (e.g. starters has a list of recipes) and not a 
hierarchical taxonomy (e.g. starters > chicken > chicked quesadillas) then 
it's much simpler to implement.  With SilvaMetadata, it will be a challenge to 
implement a hierarchical taxonomy -- it would be possible, but a new type of 
SilvaMetadata element (and Formulator Field / Widget) would be required.

What I would suggest is this:

Establishing the alternate taxonomy:

1) if your flat taxonomy is known, create a new silva metadata set and add an 
element using a formulator listfield.  Editing the list field, add your flat 
list to it.  Make sure the element is indexed, probably using a keyword or 
field index.  If a content object can be associated with multiple names in the 
taxonomy, then use a MultiListField.

2) in service_metadata/ct_mapping/manage_workspace, add the new metadata set 
to the desired Silva content types

3) now in the SMI properties tab for you will be able to add values for this 
metadata field to each object

Generating a menu based on this taxonomy:

Depending on which technology you are using for your layouts (SilvaLayout or 
the old-style using the ZMI-based index_html/layout_macro, etc)  this will be 
slightly different.  Because of this I won't suggest any code for you, but I 
will outline what you need to you.

In your layout, in addition or as a replacement to the standard navigation 
links, you will put in place rendering code for your alternate taxonomy.  You 
will need to have a page template and some helper python code.  The page 
template will use the helper python code to get the flat taxonomy list.  For 
each name in the taxonomy, you will get query the silva catalog for all 
objects having that name for the value of the new taxonomy metadata field.  
You will then loop over these objects in your pt, rendering a link for each.

There will be a challenge to sustaining this taxonomy.  There is no facility 
in SilvaMetadata to allow fields containing a strict list of values (i.e. a 
List or MultiList) to change over time.  Once a content object is associated 
with a value, you cannot remove or rename that value without first removing 
the association.

Please share if you figure this out.  As I said, this is something we've been 
interested in.

Another use for a system like this would be to generate a "tag cloud".  You 
could probably use a textfield instead of a listfield for that.

peace,
Andy


On Friday 04 December 2009 06:53:35 am Wim Boucquaert wrote:
> Hi Bernard,
> 
> bdsilva at knowledgeworks.plus.com wrote:
> > At the moment I'm imagining that the categories "starters", "desserts",
> > "fruit recipes" might be keywords in the SilvaDocument's metadata.
> > Somehow there would need to be a category navigation at a top level that
> > would be created from this keyword metadata.  If that's not the way to
> > go, please say so :-)
> >
> > I'm not looking for a search interface that returns these documents, but
> > rather a way of making the same document show up in different
> > navigational lists.
> 
> We do think it might be worth investigating some time in Silva find. You
> can edit Silva find objects to search for certain keywords in meta data
> and save the search, and search result settings in that Silva find object.
> You can then copy, rename and edit that Silva find object. You can do
> this until you have all desired meta data search queries.
> At the top level you could then reference those Silva find objects so
> that when you click on them you get the desired results.
> 
> Regards
> 
> Wim
> 
> 
> _______________________________________________
> silva-general mailing list
> silva-general at lists.infrae.com
> https://lists.infrae.com/mailman/listinfo/silva-general
> 



More information about the silva-general mailing list