Page 1 of 1

How redeclare {title} from module

Posted: Tue Aug 20, 2013 12:49 pm
by guro
Hello.
How i can redeclare {title}, {description}, {metadata} in my personal module?

Re: How redeclare {title} from module

Posted: Tue Aug 27, 2013 11:59 am
by psy
1. Use seotools2 or,
2. Assign each to a smarty var, then in the head section,

Code: Select all

{if !empty($mymodtitle)}{$mymodtitle}{else}{title}{/if}

Re: How redeclare {title} from module

Posted: Tue Aug 27, 2013 12:44 pm
by guro
You don't understand my question.
I want redeclare {title}, {description}, {metadata} without cheating in smarty. I want redeclare this variables in php code inside module.

Re: How redeclare {title} from module

Posted: Mon Sep 02, 2013 9:00 pm
by Rolf

Re: How redeclare {title} from module

Posted: Tue Sep 03, 2013 12:03 am
by guro
Thank you, but it's not what i need. Your example get title from content page. I need redeclare {title} from module without page content (like News, Products, CGBlog etc.).

Re: How redeclare {title} from module

Posted: Tue Sep 03, 2013 12:21 am
by calguy1000
You cannot. You can't re-declare existing plugins.
Only thing you can do is come up with other plugins with different names that do the same task.

Re: How redeclare {title} from module

Posted: Tue Sep 03, 2013 12:51 pm
by psy
Using Smarty templates creatively is not 'cheating'. It's what they're for so that developers do not have to overwrite/override the php in core functions, modules or plugins.


As Calguy said, if the standard plugins and/or Smarty vars don't give you what you want, write your own then call them in the templates using Smarty.

Re: How redeclare {title} from module

Posted: Tue Sep 03, 2013 1:50 pm
by guro
To psy, I already understand what calguy1000 said.
I just wanted to know how to override {title} from module. calguy1000 said, "You cannot". Ok. I understand.