1 john Apr 09, 2007 04:41
3 yabba Apr 11, 2007 11:01
<?php
if( !empty( $cat ) )
{
echo '<p class="time">';
$Item->issue_date('d F y');
echo ' ';
$Item->categories();
echo '</p> ';
}
?>
You never know, it might work :roll:
¥
4 john Apr 11, 2007 11:41
At Yabba
Yep, it works but I want it in reverse :)
I want the $Item->categories() to show on the home (index.php) page and not on Categorie pages....
5 john Apr 11, 2007 13:18
My logic for this is that if you have selected a category from the menu, you don't need it's name repeated over and over while your in that category.
On the other hand, the index page could have 5 posts from 5 different categories so it's worth linking to it within each post.
Here's what I hacked together
Ok, if there is a cleaner way I'm all for it...
<?php
if( !empty( $cat ) )
{
echo '<p class="time">';
$Item->issue_date('d F y');
echo '</p> ';
} else {
echo '<p class="time">';
$Item->issue_date('d F y');
echo ' ';
$Item->categories();
echo '</p> ';
}
?>
Thanks for the help ¥åßßå and smpdawg
6 yabba Apr 11, 2007 13:24
<?php
echo '<p class="time">';
$Item->issue_date('d F y');
if( empty( $cat ) )
{
echo ' ';
$Item->categories();
}
echo '</p> ';
?>
Oops, there was an extraneous ! in there :roll:
¥
7 john Apr 11, 2007 13:41
Thanks Killer.
Check the value of $disp.
e.g.
If it doesn't work, make sure you declare it using global near the top of your template.