content rerendering

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Locked
trick

content rerendering

Post by trick »

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.
User avatar
sjg
Power Poster
Power Poster
Posts: 310
Joined: Thu Jan 27, 2005 5:11 pm
Location: Los Angeles, CA

Re: content rerendering

Post by sjg »

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:

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)
	{
	}
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 :)
Many modules available from the http://dev.cmsmadesimple.org
The CMS Made Simple Developer Cookbook is now available from Packt Publishers!
trick

Re: content rerendering

Post by trick »

Thanks, but as I said to wishy on irc, it doesn't seem like the ContentData function is working?
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: content rerendering

Post by calguy1000 »

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.
Locked

Return to “Modules/Add-Ons”