Flexible Content Management System


Blocks/Article Flexibility via Attributes and keywords

Contributed by on May 18, 2002 - 11:09 AM

One area missing from the (0.71x) articles is keywords - normally only considered as useful for searches and the like, but I think could be used in combination with article/block attributes to provide the sort of sidebox functionality mentioned above.

Attributes would be independent name and value(s) pairs which can be assigned to any entity, such as a block or an article (or a topic or category). The value could be a string (or s

trings) or a special value such as $keyword

Attribute names are maintained by the admin/editor and assigned to the various entities - blocks, categories, topics or articles. When the attribute name/values match, the magic occurs.

As you probably cannot read my thoughts and my explanation is not particularly good, I think an example is called for, using the above stock price block mentioned above:

  1. An attribute named 'Stock Quotes' is created by the admin.

  2. A block which is able to display stock quotes has the attribute 'Stock Quotes' assigned to it with a value of 'All' or '*' or some such value to denote 'match any'.

  3. A topic of 'Business News' has the attribute 'Stock Quotes' assigned to it with a value of $keywords.

  4. An article with the topic 'Business News' will automatically inherit the $keywords value, but could also be assigned the attribute 'Stock Quotes' with a different value.

  5. When the article is displayed, any blocks with matching attribute name/values are automagically displayed with the appropriate content.

Any entity can have any number of attribute name/values assigned to it from the admin module.

This would give us the power and flexibility in block display that we currently have in the permissions system.