Joomla! Discussion Forums



It is currently Fri Nov 27, 2009 6:57 pm (All times are UTC )

 




Post new topic Reply to topic  [ 7 posts ] 
Author Message
Posted: Mon Jul 13, 2009 4:02 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Mon Jul 13, 2009 3:36 pm
Posts: 6
Hello all..

I have tring to write a module, in which must include the page title variable. But when I use the code ;

Code:
<?php echo $this->escape($this->params->get('page_title')); ?>


which I have take from the file;

Code:
component > com_content > view > article > tmpl > default.php


I take the mistake;

Quote:
Fatal error: Call to undefined method JDocumentRendererModule::escape() in C:\AppServ\www\template-maker\modules\mod_ozel\mod_ozel.php on line 1


I can't call the variable that is why I can't include the necessery libraries..

Does anyone can help?

Thanks all interests..


Top
  E-mail  
 
Posted: Mon Jul 13, 2009 4:22 pm 
Joomla! Virtuoso
Joomla! Virtuoso
Offline

Joined: Wed Aug 13, 2008 2:57 am
Posts: 4874
I do not know why you want to get the title value within your code. However, the following code
$module->title should get you the title value.

_________________
- MIG
http://www.eegan.org - helping the poor and underprivileged
educate. empower. enrich.
Support the poor and underprivileged


Top
  E-mail  
 
Posted: Mon Jul 13, 2009 4:36 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Mon Jul 13, 2009 3:36 pm
Posts: 6
imanickam wrote:
I do not know why you want to get the title value within your code. However, the following code
$module->title should get you the title value.


<?

$module->title;
echo $module;

?>

does not work..


Top
  E-mail  
 
Posted: Mon Jul 13, 2009 5:08 pm 
Joomla! Virtuoso
Joomla! Virtuoso
Offline

Joined: Wed Aug 13, 2008 2:57 am
Posts: 4874
try the following within the module code.

echo $module->title;

FYI - The title of the module is automatically rendered unless you are creating a code to render the module itself.

_________________
- MIG
http://www.eegan.org - helping the poor and underprivileged
educate. empower. enrich.
Support the poor and underprivileged


Top
  E-mail  
 
Posted: Mon Jul 13, 2009 10:42 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Mon Jul 13, 2009 3:36 pm
Posts: 6
imanickam wrote:
try the following within the module code.

echo $module->title;

FYI - The title of the module is automatically rendered unless you are creating a code to render the module itself.


Dear imanickam, the code you gave has worked but, its not what I want.. In previous messages, I think I didn'nt make myself clearly.. Here it is..

I want to write a module, that will take the title of the article which is publishing in content area. My template has module positions left, content and right. When an article is publihed in a page's content area, the module I wrote -on the left or right- (if this module will be plublished in there) will take the name of the article and publish it...

Thank you for your interest, and apologise my previous mistakes while explaining my question...

Greetings...


Top
  E-mail  
 
Posted: Tue Jul 14, 2009 12:10 am 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Mon Jul 13, 2009 3:36 pm
Posts: 6
Dear imanickam,

I found the answer.. It was a silly problem caused by calling required libraries. Now I can call my articles title very clearly..

Thanks for your interest again..

Greetings..


Top
  E-mail  
 
Posted: Thu Nov 05, 2009 1:05 am 
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Wed Sep 27, 2006 6:36 pm
Posts: 153
mind sharing how you got this done?


Top
  E-mail  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

Quick reply

 



Who is online

Users browsing this forum: almoravit, Google [Bot], ianmac, Lingtyp, skdmarx and 24 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 © 2000, 2002, 2005, 2007 phpBB Group