[pmwiki-users] wrapper

Mike Shanley thebarmy at omniversalism.com
Tue Aug 7 16:23:31 CDT 2007



Edward Laptop wrote:
> Normally I would do sometihng like div id="wrapper" in the xhtml and 
> then css define something like #wrapper { margin:0px auto;} etc etc
>  
> I have looked throuigh the pmwiki.css, and the pmwiki.tmpl (which I 
> don't fully get yet!!!). I can find declarations for several areas on 
> the pages - eg header, left column, footer etc. However, I can't seem 
> to track down the equivilent of the wrapper.
>  
> How would I go about adding a wrapper (or how would/ /I go about 
> acheiving that effect).
>  
> Many thanks in advance
Hey Ed,

Here's a few different tips:

    * First, a .tmpl file is identical to an .html file, so if you want
      a wrapper, all you have to do is add one right after <body> and
      close it right before </body> and add the code to your style sheet.
    * Second, I was confused by the start and end section declarations
      too at first. Basically, they're useless. They're used mainly so
      that in the wiki you can type something like (:noheader:) and the
      section designated as the header in the tmpl file will be hidden.
      It works alright there, but try getting a page with a sidebar to
      look good without one also!!! Don't even waste your time!
    * These are the important tags:
          o <!--HTMLHeader--> :pmwiki needs this to add special css, js,
            meta data, and so on to your <head> section
          o <!--PageText--> - this is where pmwiki deposits the page in
            the URL, like this:
                + CurrentGroup.GroupHeader (only if there is one for
                  this group)
                + CurrentGroup.CurrentPage (or edit page/"create new
                  page?" if it isn't present)
                + CurrentGroup.GroupFooter (again, only if there is one
                  for this group).
          o Next, any declarations that have this form:
            <!--wiki:SomeGroup.SomePage-->, will load that page in the
            specified place. Thus, it's important to have:
                + <!--wiki:{$SiteGroup}.SideBar-->
                + <!--wiki:{$SiteGroup}.PageActions--> ............. and
                  preferably
                + <!--wiki:{$SiteGroup}.SiteHeader--> (typically above
                  <!--PageText-->; for your header) and
                + <!--wiki:{$SiteGroup}.SiteFooter--> (typically below
                  <!--PageText-->; for your copyright)
                      # The {$SiteGroup}is a page variable. You can look
                        up more of these for interesting uses (and more
                        about all of this stuff in the PmWiki
                        Documentation Index (I prefer at pmwiki.org
                        instead of what comes with your installation.
          o It's fun to add your own special page includes for crazy
            designs. With them you can add more sidebars, subsections,
            randomly loaded text boxes, etc, than you can shake a fist
            at.....
          o Then, you can edit the CONTENT of these boxes right on your
            wiki itself, so you don't need to have an FTP client every
            time you want to update your template!

Anyway, the information on the website is much more in depth, but this 
should be enough for you to make sense out of the template.

-- 
        ~Mike Shanley~

    ~you are almost there~




More information about the pmwiki-users mailing list