this whole code is called with the following part of template: ----
{* Start Sidebar *}
<div id="sidebar" class="hascontent">
{content block='Sidebar'}
</div>
{* End Sidebar *}
----
part of css:
-----------
div#sidebar {
float: left; /* set sidebar on the left side. Change to right to float it right instead. */
width: 26%; /* sidebar width, if you change this please also change #main margins */
display: inline; /* FIX ie doublemargin bug */
margin-left: 0;
}
/* if sidebar doesnt include menu but content add class="hascontent" */
div#sidebar.hascontent {
padding: 0 1%;
width: 24%; /* make width smaller if there's padding, or it will get too wide for the floated divs in IE */
background: #000000;
border-bottom: 1px solid #ccc;
}
and the news template:
-----
<!-- Start News Display Template -->
{if $pagecount > 1}
<p>
{if $pagenumber > 1}
{$firstpage} {$prevpage}
{/if}
{$pagetext} {$pagenumber} {$oftext} {$pagecount}
{if $pagenumber < $pagecount}
{$nextpage} {$lastpage}
{/if}
</p>
{/if}
{foreach from=$items item=entry}
{*
<div class="NewsSummary">
{if $entry->postdate}
<div class="NewsSummaryPostdate">
{$entry->postdate¦cms_date_format:"%Y %B %e, %H:%M"}
</div>
{/if}
*}
<div class="NewsSummaryLink">
{$entry->titlelink}
</div>
{*
<div class="NewsSummaryCategory">
{$category_label} {$entry->category}
</div>
*}
{*
{if $entry->summary}
<div class="NewsSummarySummary">
{eval var=$entry->summary}
</div>
<div class="NewsSummaryMorelink">
[{$entry->morelink}]
</div>
{else if $entry->content}
<div class="NewsSummaryContent">
{eval var=$entry->content}
</div>
{/if}
*}
{if isset($entry->extra)}
<div class="NewsSummaryExtra">
{eval var=$entry->extra}
{* {cms_module module='Uploads' mode='simpleurl' upload_id=$entry->extravalue} *}
</div>
{/if}
{if isset($entry->fields)}
{foreach from=$entry->fields item='field'}
<div class="NewsSummaryField">
{if $field->type == 'file'}
<img src="{$entry->file_location}/{$field->value}"/>
{else}
{$field->name}: {eval var=$field->value}
{/if}
</div>
{/foreach}
{/if}
{*</div>*}
{/foreach}
<!-- End News Display Template -->
--------
and the news css:
---------
div#news {
margin: 2em 0 1em 1em; /* margin for the entire div surrounding the news list */
border: 1px solid #000;
background: #FFE9AF;
}
div#news h2 {
line-height: 2em;
background: #fff;
}
.NewsSummary {
padding: 0.5em 0.5em 1em; /* padding for the news article summary */
margin: 0 0.5em 1em 0.5em; /* margin to the bottom of the news article summary */
border-bottom: 1px solid #ccc;
background: #A3A3A3;
}
.NewsSummaryPostdate {
font-size: 90%;
font-weight: bold;
background: #F2F2F2;
}
/*
.NewsSummaryLink a:hover {
text-decoration: none;
color: #385C72;
}
*/
.NewsSummaryLink {
font-weight: bold;
padding-top: 0.2em;
background: #F2F2F2;
}
.NewsSummaryCategory {
font-style: italic;
margin: 5px 0;
background: #F2F2F2;
}
.NewsSummaryAuthor {
font-style: italic;
padding-bottom: 0.5em;
}
.NewsSummarySummary, .NewsSummaryContent {
line-height: 140%;
background: #F2F2F2;
}
.NewsSummaryMorelink {
padding-top: 0.5em;
background: #F2F2F2;
}
#NewsPostDetailDate {
font-size: 90%;
margin-bottom: 5px;
font-weight: bold;
}
#NewsPostDetailSummary {
line-height: 150%;
}
#NewsPostDetailCategory {
font-style: italic;
border-top: 1px solid #ccc;
margin-top: 0.5em;
padding: 0.2em 0;
padding-bottom: 1.3em;
}
#NewsPostDetailContent {
margin-bottom: 15px;
line-height: 150%;
}
#NewsPostDetailAuthor {
padding-bottom: 1.5em;
font-style: italic;
}
/* to add specific style to the below divs, uncomment them. */
/*
#NewsPostDetailTitle {}
#NewsPostDetailHorizRule {}
#NewsPostDetailPrintLink {}
#NewsPostDetailReturnLink {}
*/
--------
I think that is all:)