I *need* to change the title

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
trick

I *need* to change the title

Post by trick »

I have a module that I need to be able to change the title with. I found out how the title was set in content.functions.php and I assigned it to a smarty varible ( cms_title ), but I found out that this could only be accessed by the main template, when I was assigning stuff in my module it wasn't able to access that. I really don't know much about smarty, how would I go about creating a global varible that I could use as the title?
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm
Location: Fairless Hills, Pa USA

Re: I *need* to change the title

Post by Ted »

Well, the problem is that even if you do change it, it's going to cache in certain instances.  That, and in most chances, the module is going to be run AFTER the title is set.

This is all changed in svn because title is now a real smarty tag instead and uses a global variable.  :)  So maybe you should look into that?
trick

Re: I *need* to change the title

Post by trick »

Thanks :) I see the problem. After my post I looked through your source code and discovered the callback function to change the title, It's not perfect, and has limitations (because the module itselft hasn't actually run yet), but at least it works well enough.

Btw, is moduleinterface ever cached?
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm
Location: Fairless Hills, Pa USA

Re: I *need* to change the title

Post by Ted »

Nope moduleinterface will not cache...
Post Reply

Return to “Developers Discussion”