<< | Cookbook-V1 | >>

Note: The recipes here are for PmWiki versions 0.6 and 1.0 only. For PmWiki 2.0 recipes, see Cookbook.


You could just use the skin that comes with PmWiki, but your site should have your own personal touch! The best part is that if you decide to employ style sheets in your design, you can literally have users choose the skin they like the most!

You might start by looking at the PmWiki.LayoutBasics page to get started, and then using that information to understand what is going on here.

Code for a Basic Skin

    <title>$HTMLTitle - $WikiTitle</title>
    <table width='800' border='0'>
            <li><a id='browse' href='$PageUrl'>Read</a></li>
            <li><a id='edit' href='$PageUrl?action=edit'>Edit</a></li>
            <li><a id='diff' href='$PageUrl?action=diff'>History</a></li>
        <p><!--wiki:$Group.SideBar Main.SideBar--></p>

        <li><a href="#top">Back to top</a></li>
        <li><a href="$ScriptUrl/$[PmWiki/WikiHelp]">$[WikiHelp]</a></li>
        <li><a href="$ScriptUrl/$[Main/SearchWiki]">$[SearchWiki]</a></li>
        <li><a href="$ScriptUrl/$[$Group/RecentChanges]">$[Recent Changes]</a></li>
        <li><a href="$ScriptUrl/$[Main/AllRecentChanges]?action=rss">XML Feed</a></li>
    <p>$[Page last modified on $LastModified]</p>
    <p>Powered by <a href='$ScriptUrl/PmWiki.PmWiki'>PmWiki</a></p>


Key points

This skin is not pretty. But, it does happen to illustrate all the points that I feel are key to a template. You can jazz it up with style sheets all you want, but I felt like they might cloud the real message here, so I have left them out. To get an idea of how to use them, check out some of the existing skins on the Cookbook.Skins page, or just check out the one that comes with your installation. It can be found in pub/skins/pmwiki. Back to this example, though, here are the key points to take away from this example.

This is the title of the wiki page you are on.
This is the title of your wiki.
I use this on the Browse link, because it will just show you the page at this address. If you start adding actions to it, you will get different results.
This is a cool idea, you can still use the same address, but now you send it an action, and in this case it will load the edit box. NOTE: the edit box will load in place of the content you would normally have in the page.
You can see the history page by loading this link. Again, this will load in place of the page's content.
This tag literally places the content of the current page. Whereever you want the main body of the page to appear, you should place this tag.
<!--wiki:$Group.SideBar Main.SideBar-->
You can place a navigation sidebar on your site by including this tag. Notice that I have placed the $Group.SideBar tag first. If your current page group has a SideBar page, this will display it first, then the Main sidebar. To actually make this a sidebar in this simple example, I have just placed the sidebar in the right column of a table, and the page content in the left column.
Since I have this as the link target, clicking this link will open up the help system.
This one will open the search page if the link is clicked.
This one shows you the recent changes page.
This one gives you an RSS feed of the recent changes. Very handy for the new FireFox!
This is the date this page was last modified.

So now you should have a place to start. You can add the markup for a tabbed interface, next, which you can read about on the HowToMakeATabbedSkin page. pmwiki-2.3.18 -- Last modified by {{DanDube}}

from IP: ip should be disabled by default for security reasons