Wednesday, September 9, 2009

Code Identification 3

It is now possible to have two columns only on the front page without changing the rest of the website. As before, in Pligg.tpl put (where [ = <);

[!-- START LEFT COLUMN --]
{if $pagename eq "submit"}
{elseif $pagename eq "index" }

[div id="leftcoltwo"]
{if $pagename eq "group_story"}
[div id="group_navbar"][/div]
{/if}
{checkActionsTpl location="tpl_pligg_content_start"}
{checkActionsTpl location="tpl_pligg_above_center"}
{include file=$tpl_center.".tpl"}
{checkActionsTpl location="tpl_pligg_below_center"}
{checkActionsTpl location="tpl_pligg_content_end"}
[/div]
[div id="leftcoltwo"]

{elseif $pagename neq "story" && $pagename neq "profile" && $pagename neq "login" && $pagename neq "register" }
[div id="leftcol"]
{else}
[div id="leftcol-wide"]
{/if}
{if $pagename eq "group_story"}
[div id="group_navbar"][/div]
{/if}
{checkActionsTpl location="tpl_pligg_content_start"}
{checkActionsTpl location="tpl_pligg_above_center"}
{include file=$tpl_center.".tpl"}
{checkActionsTpl location="tpl_pligg_below_center"}
{checkActionsTpl location="tpl_pligg_content_end"}
[/div]


[!-- END LEFT COLUMN --]

And add the following to Style.css

/* STORIES */
.leftwrapper {padding-left:12px;}

#leftcol {
width: 550px;
float: left;
overflow: hidden;
}
#leftcoltwo {
width: 275px;
float: left;
overflow: hidden;
}

This means that when $pagename = index, a segond column is added using div = leftcoltwo instead of leftcol


No comments:

Post a Comment