Page 1 of 1
How do I not replace the {Content} with the results of a mod
Posted: Wed Mar 07, 2012 5:08 pm
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.
Re: How do I not replace the {Content} with the results of a
Posted: Fri Mar 09, 2012 5:53 pm
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.
Re: How do I not replace the {Content} with the results of a
Posted: Fri Mar 09, 2012 9:37 pm
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!?!
Re: How do I not replace the {Content} with the results of a
Posted: Fri Mar 16, 2012 9:31 pm
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?