> I can't figure out how to associate content and layout with a page.
> Or is there only one template and all pages in a site have the same
> exact nav?
> Wouldn't it make sense to have more than one layout within a style so
> maybe each section of a site could be a little differentiated.
> Either way I can't understand how content is associated with a given
> section of the site , or a given page.
> Any thoughts.
Here's something of a Midgard 'non-insider' perspective
on some aspects of the control of site content and layout.
I'll rely on the experts to correct any errors.
Midgard gives you a couple of levels of abstraction to
work with. In Content Administration, you can structure
the information on your site into topics and articles
without regard to how this information is organized when
it is presented to the user. As such, you can have a
relatively 'pure' representation of the content of a site.
Under Host (Page) Administration, pages are created that
reference these topics and articles in a way that is
structured for presentation on the web. Pages are
associated with a particular style that is created in
Style Administration.
Here's where I think the waters can get a little murky.
You might want to maintain a viewpoint that the 'content'
of an individual page is all the information that is needed
to interpret the page in context of the site. That includes
things like page headings and links as well as the referenced
topics and articles. But in the Midgard Admin and VMUC
example sites, there are elements of page content within
the elements of style. For example, the 'navilinks' style
element of VMUC has specific links written into it:
<br>
<strong><a href="/" class="navi">Main page</a></strong>
<br>
<strong><a href="/about/" class="navi">About VMUC</a></strong>
etc.
Some might consider this a violation of the idea of
separating content from presentation. If so, it's
possible to rework the site without too much trouble
to make this separation a little more complete. For
example, you can create a set of articles in Content
Administration that contain the link urls and titles
for the navigation element of a particular page.
Instead of the hard-coded links you put some generic
display code in 'navilinks', such as:
<? if ($link = mgd_list_topic_articles($linkid,"score")) while ($link->fetch()) { ?>
<a href="&(link.url);" class="navi">&(link.title);</a><br>
<? } ?>
where $linkid points to the topic containing the
relevant link articles. By setting $linkid in the
code-init page element defined in Host (Page) Administration,
it's possible to maintain control over the content of the
navigation element from one location (Page Administration)
and maintain better isolation of content and style.
Obviously Midgard doesn't enforce this viewpoint. You
have to exercise some discipline to maintain this
separation rigorously if that's what you want.
Paul
--
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]