The Joomla! Forum ™



Forum rules


Please use the mailing list here: http://groups.google.com/group/joomla-dev-general rather than this forum.



Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Get article title
PostPosted: Wed May 09, 2012 5:10 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Tue May 08, 2012 3:48 am
Posts: 2
Hi,

I have a form that creates articles by updating the _content database table. I need to update the content of the articles and I want to use their titles. I tried the following but it's not working. I am using joomla 2.5 and the sourcerer plug-in for the code.

Code:
$option = JRequest::getCmd('option');
$view = JRequest::getCmd('view');
if ($option=="com_content" && $view=="article") {
    $ids = explode(':',JRequest::getString('id'));
    $article_id = $ids[0];
    $article =& JTable::getInstance("content");
    $article->load($article_id);
    echo $article->get("title");
}


So basically, the content is the same for all the articles since they are created automatically. I need to find the article name to use within each of the articles.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 



Who is online

Users browsing this forum: No registered users and 11 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group