Marc: Difference between revisions
From Amar
Jump to navigationJump to search
No edit summary |
No edit summary |
||
(5 intermediate revisions by the same user not shown) | |||
Line 8: | Line 8: | ||
'''<?php if ($ | '''<?php if ($navsection == 'port') { ?>''' | ||
Any HTML | Any HTML | ||
Including | Including | ||
Line 16: | Line 16: | ||
Note it's realy 2 = signs | Note it's realy 2 = signs | ||
= = | = = | ||
<?php | |||
$navsection='portfolio'; | |||
$bodysection = 'websites'; | |||
?> | |||
<?php echo ($navsection == 'home') ? ' class="main-current"' : ''; ?> | |||
<?php | |||
if ($navsection == 'home') { | |||
echo ' class="main-current"'; | |||
echo ' something else'; | |||
} else { | |||
echo ""; | |||
echo ""; | |||
} | |||
?> |
Latest revision as of 02:57, 17 November 2011
<body id="<?= $navsection ?>">
Any variable can be used by:
<?= $varname ?>
To load selectively
<?php if ($navsection == 'port') { ?> Any HTML Including <link rel="stylesheet" href="/css/style.css" /> <?php } ?>
Note it's realy 2 = signs
= =
<?php $navsection='portfolio'; $bodysection = 'websites'; ?>
<?php echo ($navsection == 'home') ? ' class="main-current"' : ; ?> <?php if ($navsection == 'home') { echo ' class="main-current"'; echo ' something else'; } else { echo ""; echo ""; } ?>