content rerendering
content rerendering
I want to make a module that will take the content of a web page (the stuff that is in {content}) and do a buch of stuff to it. Is there a function for this, I couldn't find anything in the skeleton module.
Re: content rerendering
Well, the Skeleton module is only a starting point.
The Authoritative Guide is the module base class CMS_ROOT/lib/classes/class.module.inc.php
Some likely starting points for you seem like they might be:
There's a lot of great stuff in there. When I was writing Skeleton, I was amazed at all the stuff I'd overlooked while writing other modules 
The Authoritative Guide is the module base class CMS_ROOT/lib/classes/class.module.inc.php
Some likely starting points for you seem like they might be:
Code: Select all
/**
* Called with the content of the template before it's sent to smarty
* for processing.
*
* @param string The template text
*/
function ContentTemplate(&$template)
{
}
/**
* Called with the content of the stylesheet before it is pasted into the
* template.
*
* @param string The stylesheet text
*/
function ContentStylesheet(&$stylesheet)
{
}
/**
* Called with the title before it is pasted into the template.
*
* @param string The title text
*/
function ContentTitle(&$title)
{
}
/**
* Called with the content data before it is pasted into the template.
*
* @param string The content text
*/
function ContentData(&$content)
{
}

Many modules available from the http://dev.cmsmadesimple.org
The CMS Made Simple Developer Cookbook is now available from Packt Publishers!
The CMS Made Simple Developer Cookbook is now available from Packt Publishers!
Re: content rerendering
Thanks, but as I said to wishy on irc, it doesn't seem like the ContentData function is working?
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
- Location: Fernie British Columbia, Canada
Re: content rerendering
check out ContentPreRender and ContentPostRender, that's what CustomContent users.
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.
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.