|
Joomla 1.0.x Templates: conditional statements |
| Drucken |
|
E-Mail
|
|
Hier kommt eine Auflistung nützlicher "conditional statements" für Joomla 1.0x Templates.
1. Module nur laden, wenn es sie gibt (Beispiel Position "user1"):
<?php if (mosCountModules('user1')) { ?>
<?php mosLoadModules( 'user1', -2 );?>
<?php } ?>
2. auf Homepage NICHT anzeigen:
<?php if (strtolower($option) != 'com_frontpage') { ?>
<?php mosIrgendeinBefehl(); ?>
<?php } ?>
3. wenn/dann switches:
<?php if (strtolower($option) != 'com_frontpage') { ?>
<?php
if ( mosCountModules( 'center1' ) ) {
mosLoadModules ( 'center1', -2 );
} ?>
<?php } else { ?>
<?php
if ( mosCountModules( 'center2' ) ) {
mosLoadModules ( 'center2', -2 );
} ?>
<?php } ?>
4. Spalte nicht anzeigen:
<?php if ( mosCountModules( 'right' ) <= 0) { ?>
<style type="text/css" media="screen">
#main-body {width:100%;}
#inhalt{width:75%;}
#rechts{width:25%;}
#rechts-leer{display:none;}
</style>
<?php } ?>
|
|
Letzte Aktualisierung ( 09.12.2008 )
|