2009-08-21, 14:30:54
Excuse my bad english, i'm italian.
I'm tryin to obtain a "dynamic sidebar": if theme directory contain a file called <slug name>_sd.php, GetSimple include it.
I wrote code below at "components page", in component "sidebar".
Code appear to be valid, but the sidebar don't appear (only html instruction after this code still appear).
<?php $includi = "/theme/miotema/" . return_page_slug() . "_sd.php"; ?>
<?php if (file_exists($includi)) : ?>
<?php include ($includi); ?>
<?php endif; ?>
Below is the code in page "/theme/miotema/contatti_sd.php:
<?php
print "ciao";
?>
How can I obtain a dynamic sidebar?
Thanks
Panathos
I'm tryin to obtain a "dynamic sidebar": if theme directory contain a file called <slug name>_sd.php, GetSimple include it.
I wrote code below at "components page", in component "sidebar".
Code appear to be valid, but the sidebar don't appear (only html instruction after this code still appear).
<?php $includi = "/theme/miotema/" . return_page_slug() . "_sd.php"; ?>
<?php if (file_exists($includi)) : ?>
<?php include ($includi); ?>
<?php endif; ?>
Below is the code in page "/theme/miotema/contatti_sd.php:
<?php
print "ciao";
?>
How can I obtain a dynamic sidebar?
Thanks
Panathos