By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,948 Members | 1,080 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,948 IT Pros & Developers. It's quick & easy.

how to show title of module in the form

P: 10
i am creating a module there is not show module name in the site
Jan 18 '12 #1
Share this Question
Share on Google+
1 Reply

P: 10
i got answer of this

Expand|Select|Wrap|Line Numbers
  1. <?php
  2. $option = JRequest::getCmd('option'); // Fetches and returns a given filtered variable.JRequest::getCmd
  3. $view = JRequest::getCmd('view');  // Fetches and returns a given filtered variable.JRequest::getCmd
  4. if ($option=="com_content" && $view=="article")
  5. {
  6.     $ids = explode(':',JRequest::getString('id')); // The explode() function breaks a string into an array.
  7.     $article_id = $ids[0];
  8.     $article =& JTable::getInstance("content"); // The JTable class is an implementation of the Active Record design pattern. It is used throughout Joomla! for creating, reading, updating, and deleting records in the database table.
  9.     $article->load($article_id);
  10.     echo"<br><br>";
  11.     echo "here we see our title name";
  12.     echo"<br><br>";
  13.     echo $article->get("title");
  14.     echo "Article ID";
  15.     echo $article_id;
  16. }
  17. ?>
with article id
Jan 18 '12 #2

Post your reply

Sign in to post your reply or Sign up for a free account.