How redeclare {title} from module

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Post Reply
User avatar
guro
Power Poster
Power Poster
Posts: 985
Joined: Thu Apr 26, 2012 8:38 pm
Location: Ramenskoe

How redeclare {title} from module

Post by guro »

Hello.
How i can redeclare {title}, {description}, {metadata} in my personal module?
psy
Power Poster
Power Poster
Posts: 463
Joined: Sat Jan 22, 2005 11:19 am

Re: How redeclare {title} from module

Post 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}
User avatar
guro
Power Poster
Power Poster
Posts: 985
Joined: Thu Apr 26, 2012 8:38 pm
Location: Ramenskoe

Re: How redeclare {title} from module

Post 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.
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Location: The Netherlands
Contact:

Re: How redeclare {title} from module

Post by Rolf »

- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
User avatar
guro
Power Poster
Power Poster
Posts: 985
Joined: Thu Apr 26, 2012 8:38 pm
Location: Ramenskoe

Re: How redeclare {title} from module

Post 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.).
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: How redeclare {title} from module

Post 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.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
psy
Power Poster
Power Poster
Posts: 463
Joined: Sat Jan 22, 2005 11:19 am

Re: How redeclare {title} from module

Post 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.
User avatar
guro
Power Poster
Power Poster
Posts: 985
Joined: Thu Apr 26, 2012 8:38 pm
Location: Ramenskoe

Re: How redeclare {title} from module

Post 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.
Post Reply

Return to “Developers Discussion”