On 17 Jan, Derek Beattie wrote:
> I was looking at the some of the sites that use Midgard.  Stonesoft's main page
> has one layout but if you click on any of the links it uses a different layout.
>  How is this done in Midgard.  I assume that PHP is used and checks the page to
> see if its the root page and if it is uses a certain layout.

Yes, that is one way to do it. However, it is not the
only way to do it.

Normally when you create a host, you associate a style
with it. But you can also associate styles to individual
pages (with the pulldown menu in page admin). IIRC,
this was what we did with Stonesoft's front page. Those
style associations override the host's style for that
particular page.

Another option there is to use page elements to override
all style elements needed. An example on how to do this
would to to create a page element named ROOT.

And then there is of course the option you mentioned.
You can add a simple PHP script to the style that checks
whether the page used is the site's front page:

  <?php if ($midgard->uri == '/') { ?> 
      style for the front page
  <?php } else { ?> 
      style for other pages 
  <?php } ?>

> Derek

/Bergie

-- 
-- Henri Bergius -- +358 40 525 1334 -- [EMAIL PROTECTED] --
               http://www.iki.fi/Henri.Bergius


--
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]

Reply via email to