get article id with php for display in category blog view

Have a programming question regarding your component, plug-in, extension or core hacks? Have an interesting tidbit, FAQ or programming tip you’d like to share? This is the place for you.

Moderators: tjay, seadap, Rogue4ngel, matthewhayashida

Post Reply
smileylolo
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Sat Oct 13, 2007 1:38 pm

get article id with php for display in category blog view

Post by smileylolo » Tue Mar 11, 2008 11:51 am

Hi!

I'm having a bit of trouble I hope someone can please help with!
I've installed mossnippet and I've created links at the bottom of articles that appear in a category blog view (so lots of articles on one page, each with an individual set of links at the bottom)... I need a way to get the current article id with php so that I can create an 'email article' link in my own format.

Any help would be great appreciated!

Thanks!

smileylolo
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Sat Oct 13, 2007 1:38 pm

Re: get article id with php for display in category blog view

Post by smileylolo » Thu Mar 13, 2008 12:37 pm

As a quick update I tried the following code:

Code: Select all

<?php
 $id = intval( mosGetParam( $_REQUEST, 'Itemid', 0 ) );
 echo $id;
?>
but got back the same number for every single article in the blog view... does anyone know how ot fix this? help would be greatly appreciated!


Post Reply