Front-end-initiated action to just do something, not display

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
tomphantoo
Forum Members
Forum Members
Posts: 15
Joined: Mon Apr 11, 2011 7:33 am

Front-end-initiated action to just do something, not display

Post by tomphantoo »

Is there a way to block all changes to the frontend display, after a site url has been requested? Something akin to SuppressAdminOutput() for backend display?

I want to be able to just "do something" instead of "display something", after receiving a relevant URL request.

Sofar I can't find a way to process an action, which itself displays nothing, without stuffing up the display.
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3484
Joined: Mon Nov 28, 2011 9:29 am
Location: The Netherlands

Re: Front-end-initiated action to just do something, not dis

Post by velden »

Sure:

use a template with nothing in it but:
{content assign='content' wysiwyg=false}

Create a page connected to that template. Do your thing inside the content block (e.g. call a udt).

It will output an empty page.

EDIT: '?showtemplate=false' in the url will skip whole template but default content block {content} too. But depending on how that default content block is setup AND what your procedure will output it might/might not return an empty page.
Post Reply

Return to “Developers Discussion”