How do I not replace the {Content} with the results of a mod

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
deac
New Member
New Member
Posts: 2
Joined: Mon Mar 05, 2012 1:30 pm

How do I not replace the {Content} with the results of a mod

Post by deac »

I have created a module based on the Skeleton module which is used to submit data via a form to a database. When data is submitted correctly to the DB the action is to go to the default action. This has the effect of replacing the web page detail in the {Content} tag for that page with the template for module. This is fine in most case but I would like the template to be shown as well as the page detail for that page. What variable is being passed to tell the page to replace the detail in the {Content} tag with the template? I am probably missing something simple here but any help gratefully accepted.
xlilien
Forum Members
Forum Members
Posts: 11
Joined: Thu Mar 08, 2012 10:51 pm

Re: How do I not replace the {Content} with the results of a

Post by xlilien »

Hi,

method createFormStart which I assume you are using to create the form, has optional parameter inline which says whether to display the result of the submitted form in the {content} tag or in itself.

You can find the method in the class.CMSModule.php in lib directory.

I hope this helps.
deac
New Member
New Member
Posts: 2
Joined: Mon Mar 05, 2012 1:30 pm

Re: How do I not replace the {Content} with the results of a

Post by deac »

Hi Thanks for this.

Unfortunately, regardless of whether I set the $inline flag to false or true in the CreateFormStart the template called still replaces the {Content}. Mmm!?!
xlilien
Forum Members
Forum Members
Posts: 11
Joined: Thu Mar 08, 2012 10:51 pm

Re: How do I not replace the {Content} with the results of a

Post by xlilien »

That's weird...

here is the code I use to start a form:

Code: Select all

$smarty->assign('startform', $this->CreateFormStart($id, 'default', $returnid, 'post', null, true));
and in the template i just call the plugin...and it works.

What is your way to start the form and to include the plugin in the page?
Post Reply

Return to “Developers Discussion”