So you need static pages, like for your editorial policy, your contact info, or maybe for working groups?
Mir doesn't support these out of the box, but setting them up is pretty trivial. This document will walk through the process.
The first thing to do is create an article type for static pages through the Mir admin. This is done under "super-user functions" by clicking on, predictably, "Article Types". Let's use the name "static" for our new article type. Once it's added, you may also want to add a key/value to the adminlocal.properties language bundle so you don't see:
[articletypes.static]
on the startpage. So put something like:
articletypes.static = Static Page
in that file.
Now comes the fun part. First, you'll need a static page template. I'd suggest copying article.template, and removing the parts you don't want to show up(like add a comment links or comments). You could also use <if> statements in your normal article template if you wanted to make maintaing this easier. It really depends on how your templates are set up(include files? routines?) and what works best for you. The important thing here is that we are going to work off the same template as articles. Let's call our new template "staticpage.template".
Now, the last step to tie this all together is editing producers.xml. Again, you might want to integrate this with your normal articles producer, but for the sake of clarity I'll use an entirely separate producer:
<producer name="staticpages">
<verbs>
<verb name="changed" default="1">
<Define key="verbcondition" value="(not is_produced)"/>
<Set key="limit" value="10"/>
</verb>
<verb name="all">
<Define key="verbcondition" value=""/>
<Set key="limit" value="-1"/>
</verb>
</verbs>
<body>
<Enumerate key="article" table="content" selection="${verbcondition} and to_article_type = ${articletype.static}"
limit="limit" order="webdb_create desc">
<Enumerate
key="media" table="image"
selection="exists (select * from content_x_media where media_id=images.id and content_id=${article.id})"
order="id desc">
<GenerateMedia key="media" />
</Enumerate>
<Enumerate
key="media" table="video"
selection="exists (select * from content_x_media where media_id=video.id and content_id=${article.id})"
order="id desc">
<GenerateMedia key="media" />
</Enumerate>
<Enumerate
key="media" table="audio"
selection="exists (select * from content_x_media where media_id=audio.id and content_id=${article.id})"
order="id desc">
<GenerateMedia key="media" />
</Enumerate>
<Enumerate
key="media" table="otherMedia"
selection="exists (select * from content_x_media where media_id=other_media.id and content_id=${article.id})"
order="id desc">
<GenerateMedia key="media" />
</Enumerate>
<If condition="article.is_published == '1'">
<then>
<Language>
<Generate
generator="/article.template"
destination="${config.storageRoot}/${pathprefix}/static/${article.edittitle}.shtml"/>
</Language>
<Generate
<Generate
generator="/languagebar.template"
destination="${config.storageRoot}/languagebar/${article.to_original.date.formatted.yyyy}/${article.to_original.date.formatted.MM}/${article.to_original.id}.shtml"/>
<IndexContent key="article" pathToIndex="${config['IndexPath']}"/>
</then>
<else>
<UnIndexContent key="article" pathToIndex="${config['IndexPath']}"/>
</else>
</If>
<MarkContent key="article"/>
</Enumerate>
</body>
</producer>
The only real trick here is setting the pages to generate to a location that doesn't have a lot of numbers in it:
<Generate
generator="/article.template"
destination="${config.storageRoot}/${pathprefix}/static/${article.edittitle}.shtml"/>
"article.edittitle" is what shows up in the admin interface as "Context Title". Like with many mir setups, we had to repurpose an unused database field. Basically, from the standpoint of the admins, all they have to do to make a static page is create an article, set it's article type to Static Page, and set "Context Title" to what they want the url to look like.
Now what we have are static pages that behave more or less like normal mir articles: they can have translations (which you can add via the admin interface if you're not comfortable with keeping an add a translation link on your internal documents), they will be indexed by the search engine, and most importantly, admins can update these pages whenever they want to.
--
JohnDudaAccount - 31 Mar 2005