Subject: Re: [Fwd: Re: Primary colours of LyX? Was: Website re-design From: AK <[EMAIL PROTECTED]> To: Rex C. Eastbourne <[EMAIL PROTECTED]>
References:     <[EMAIL PROTECTED]>

Are there any limitations on what can be done as template for the wiki CMS? Is the way it works that you just plug in any html file with identifiers in it where to insert dynamic content? thanks, -ak

No limitations except that it should work in Opera, Firefox, Safari etc... maybe it even has to work partially in IE;-)

And yes, it's basically a HTML file with identifiers that are replaced with dynamic content.

The quick explanation of how it works is that there's a template file which contains e.g.

<body>
    <div id='wrapper'>
        <div id='head'>
            <div id='page-title'>
                $title</div>
            <div id='page-subtitle'>
                $currentpage</div>
            <div id='page-actions'>
                <!--wiki:$Group.PageActions $SiteGroup.PageActions-->
            </div>
        </div>
        <div id='content'>
            <div id='col-left'>
                <!--PageLeftFmt-->
                <div id='sidebar'>
                    <!--wiki:$Group.SideBar $SiteGroup.SideBar-->
                </div>
                <!--/PageLeftFmt-->
            </div>

The PmWiki engine then replaces '$title' and '$currentpage' with whatever these variables are set to. The line
                <!--wiki:$Group.PageActions $SiteGroup.PageActions-->
will be replaced with a wiki page, where it first looks for the page
        $Group.PageActions
and if that page isn't available, it uses
        $SiteGroup.PageActions

The same principle is used in the line
                    <!--wiki:$Group.SideBar $SiteGroup.SideBar-->
which sets which wiki page to use as the sidebar.

The speial tags
                <!--PageLeftFmt-->
                ...
                <!--/PageLeftFmt-->
I'm not sure of, but I think they are there to indicate what part of the page this part of the template belongs to. This then allows a pmwiki directive, (:noleft:), to disable the use of a left part on the wiki page.


Andrei should read a little bit here.

http://www.pmwiki.org/wiki/PmWiki/Skins
http://www.pmwiki.org/wiki/PmWiki/SkinTemplates



I'll assume that our skin is called 'lyx'.

In the first section, Andrei doesn't have to read steps 1-4, and step five basically means that:
* If a skin file called lyx.php exists, it will be executed
  This script can create custom markup and also select which
  "template" file to load if so desired. Otherwise a template
  file called lyx.tmpl will be used.

Andrei could look at the files in abitmodern to see examples:
        http://www.pmwiki.org/wiki/Cookbook/ABitModernSkin
        http://www.pmwiki.org/pmwiki/uploads/Cookbook/abitmodern.zip

Joost has modified these files and created the skin that we are currently using. Btw, I don't know if Joost is interested in collaborating with the design of the template - he certainly seems to know stuff about design anyway. The documentation page about skins suggest starting with the standard pmwiki skin, as that it is a relatively uncomplicated skin.
That could be a good idea.

/Christian

PS. Even if Andrei is on Windows, it's quite easy for him to set up a local installation of pmwiki. He should look here.
        http://www.pmwiki.org/wiki/Cookbook/Standalone

--
Christian Ridderström, +46-8-768 39 44               http://www.md.kth.se/~chr

Reply via email to