You are here:   » Home » Documentation » Details » How-To » Links » Home

Presentation of teasers in the left and right navigation column

Author: Dr. Frank Hoffmann, 2005/11/21

Teaser objects commonly are assembled via the standard template pageelement_Teaser and presented on one side (e.g. on the right side). If now teaser objects shall be shown on both sides, a special object is to be applied.

Solution: The special teaser object differs from standard teaser primarily because of the meta_type 'ZMSCustom'. Using this fact a simple case distinction can be made in the teaser template and duplicate this as a right and left variant. The teaser templates are named pageelement_TeaserLeft and pageelement_TeaserRight. The call of these templates finally happens in the left resp. right page region (pageregionLeft and pageregionRight).

Zoom (98KB)

Presentation of two different teaser objects: left teaser and standard teaser (right).

Zoom (98KB)

Presentation of two different teaser objects: left teaser and standard teaser (right).

<!-- pageregionLeft -->
<div id="pageregionLeft">
<dtml-var pageelement_Macronavigation>
<dtml-var pageelement_TeaserLeft>
</div>
</!-- /pageregionLeft -->


<!--  pageregionRight -->
<div id="pageregionRight">
<dtml-var pageelement_Metanavigation>
<dtml-var pageelement_Search>
<dtml-var pageelement_TeaserRight>
<dtml-var pageelement_Links>
<br />
<br />
</div>
<!-- /pageregionRight -->

Teasers_ger.zip (2KB)

Comment: The zipped file Teasers.zip contains a Spec.Object definition specObj_teaserElementLeft.xml for the left teaser as well as a ZEXP with the DTML templates pageelement_TeaserLeft and pageelement_TeaserRight; the former renders all left teasers, the latter renders all standard teaser.
Hint: the SpecObj-configuration is optimized for ZMS2.8+ (contains CSS method).