Adding optional page layouts to MT 4+ themes

There are instances when it is desired to have page layout options in the MT 4+ themes besides wtt, twt, tw, wt, mw and wm  (w=wide, t=thin, m=medium). A case in point: on our personal Blog Providence (using the MT Professional Black Theme) we wanted a full Page width with no sidebars to display a Google Calendar and Google Map the entire width. Here's how we got it:

The Stylesheet index includes two css files:
@import url(<$mt:StaticWebPath$>themes-base/blog.css);
@import url(<$mt:StaticWebPath$>addons/Commercial.pack/themes/professional-black/screen.css);
The themes-base/blog.css is the standard setup for all themes and contains the css definitions for the various layouts. We added the following:
/* Wide */
.layout-w #alpha {
    width: 940px;
}
.layout-w #beta }
    width: 0px;
}
The standard Page layout is wide-medium (wm) defined in the Page archive template with this code:
<$mt:Var name="page_layout" value="layout-wm"$>
The "page-layout" variable is later used to set the content style. We have two Pages created: "Road calendar" and "Road map" requiring the wide layout. Here is the code we added to the Page archive template (right after the standard value above):
<mt:If tag="PageTitle" eq="Road map">
<$mt:Var name="page_layout" value="layout-w"$>
</mt:If>
<mt:If tag="PageTitle" eq="Road calendar">
<$mt:Var name="page_layout" value="layout-w"$>
</mt:If>
Add the content to the pages and you will have a single wide page layout. Here are my examples:
Road Calendar
Road Map
user-pic

Merv

Specializing in management consulting, marketing, Website/Blogsite development, Movable Type, application of open source software and Activity Based Costing and Pricing for service organizations. Contact us for more information.

No responses to “Adding optional page layouts to MT 4+ themes”

Leave a Comment, Question, Inquiry or Reply ...

Some HTML is permitted: a, strong, em

Current Hybrid News Style: Blue-Gray

Follow BIG

rss icon rss comment icon facebook icon linkedin icon twitter icon feedburner icon

Best Wordpress Source

WPMU DEV - The WordPress Experts

get in MOTION

Featured Technology

Requires Flash Player