2 sam2kb Jun 13, 2011 20:11

Thanks Alex
What if I want to display the id for the currant post being viewed like when using
$Blog->ID
, instead of viewing the id for the currant blog displayed, you will view the id for the currant post displayed?
perhaps:
$Item->ID
Got it thanks.
global $Blog, $Item;
$this_blog = $Blog->ID;
$this_post = $Item->ID;
$Item object is only defined globally (not in post loop) only in a single post/page view. Use this additional check.
global $Blog, $Item;
$this_blog = $Blog->ID;
if( !empty($Item) )
{
$this_post = $Item->ID;
}
Updated, thanks. (:
I only need it in this instance for single post view and pages, modified images linked to posts to display in either thumb or not and list view or grid. (similar to media index), but instead only images for the post viewed.
Integrated it with a lightbox, so images linked to a post are now displayed as a gallery. Works great and looks nifty.
If you are not sure that particular Item exists, use this instead
Same applies to Blog, Skin, Chapter (category)