This hits right on one of the enhancements I want to make to midgard --
adding a field in page that (optionally) points to topic, and a field in
topic that (optionally) points to page.

Note that pages can exist without related or used topics (e.g., admin
site), while topics can actually contribute to multiple pages.  This is why
I want the "pointer" (or call them "association") fields to be optional.

Meantime, the workaround I am using is a strictly bludgeon method -- I have
a page hierarchy, and a topic hierarchy.  There is a 1-to-1 correspondence
between pages<->topics and subpages<->subtopics.  (Of course, topics and
subtopics may have articles hung beneath them depending on programmatic
requirements.)

The relationship is determined by  a setup rule which I have arbitrarily
created and am enforcing in the site setup:  topic name == ( page name =
page title with spaces replaced by underbars (_)).

This lets me set up a dynamic navbar based on actual content, as well as a
site map, but at the expense of the independence of content vs. site
structure that midgard offers, which is why I want to add the fields
I mentioned above.

By the way, the reason that I want to use topics for the navbars instead of
just the page hierarchy is so that I can use the "score" field to order the
buttons. So, obviously, I will also be adding a "score" field to the page
record...

the cat

Fred Hirsch wrote:

> Hmmm.. well, the Midgard manual doesn't seem to mention this, so I will
> attempt to ask it here. I have a contents link section for my site
> similar
> to the navilinks section on the test site. I would like to have this
> section dynamically expand topics upon topic selection. As an example:
>
> - Company
> - Products
> - Resources
> - Help
>
> When clicking on Company, I would like the contents to expand to a
> predefined list, i.e:
>
> - Company
>    - Members
>    - News Releases
>    - Legal
>    - Inquiry
> - Products
> - Resources
> - Help
>
> My question is, how do I get the topic ID or perhaps the page URL from
>         http://www.foo.com/company/
> My initial idea was to use an if statement such as
>      if (mgd_is_article_in_topic_tree(14, $id)) {
>           HAPPY HTML BLOCK
>      }
> This only works for individual articles, not the topic or its subtopics.
> Any good ideas here? I am not looking for a dynamic tree expansion using
> JScript, just something that changes the navilinks on various web pages
> depending on the content section/subsection.
>
> Thanks in advance.
>
> --
> This is The Midgard Project's mailing list. For more information,
> please visit the project's web site at http://www.midgard-project.org
>
> To unsubscribe the list, send an empty email message to address
> [EMAIL PROTECTED]


--
This is The Midgard Project's mailing list. For more information,
please visit the project's web site at http://www.midgard-project.org

To unsubscribe the list, send an empty email message to address
[EMAIL PROTECTED]

Reply via email to