1 achillis Jun 13, 2011 07:56
3 achillis Jun 13, 2011 20:35
Thanks Alex
4 achillis Jul 06, 2011 17:47
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
5 achillis Jul 06, 2011 20:52
Got it thanks.
global $Blog, $Item;
$this_blog = $Blog->ID;
$this_post = $Item->ID;
6 sam2kb Jul 06, 2011 23:56
$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;
}
7 achillis Jul 07, 2011 15:25
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)