Module clears page content

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
User avatar
kidcardboard
Forum Members
Forum Members
Posts: 54
Joined: Mon Sep 28, 2009 5:25 pm

Module clears page content

Post by kidcardboard »

I've built a module to filter venues that meet certain criteria. My problem is when you hit "Filter" the original page contents are removed and only the search results are displayed.

For the page contents I have:
Page content that disappears
.
.
.

{cms_module module="VenueManager" action="accommodations"}

and in the code file:
code that does the filtering and setting of smarty tags
.
.
.
echo $this->ProcessTemplate('accommodations.tpl');
(I can provide the actual code but its probably irrelevant to what I'm doing wrong)

Page/issue can be viewed at:
http://www.meetingscalgary.com/cms/inde ... odations-2

The client wants to still be able to edit the copy at the top of the page or I would just put it in the module.

Any ideas?
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm
Location: Raalte, the Netherlands

Re: Module clears page content

Post by RonnyK »

I dont know for sure, but it seems that the filtering, acts as a redirect, where the result is pushed to the content-area of the page. As it works without detail-page, the {content} of the current page is overwritten.

You could try if inline=true can be used, to replace the module-call instead of {content}.

Ronny
User avatar
kidcardboard
Forum Members
Forum Members
Posts: 54
Joined: Mon Sep 28, 2009 5:25 pm

Re: Module clears page content

Post by kidcardboard »

Ummm.... what? Either I don't understand what you're getting at or you don't understand what's happening.

The module call is not in the page template but in the page contents (which gets rendered in the {content} tag). The template that's being called at the end ('accommodations.tpl') is for the module and contains everything needed by the module to render the output (like the filter options and table header which are both there the whole time). There is no redirect that I can tell.

What is this "if inline=true" that you speak of?
Post Reply

Return to “Developers Discussion”