Jump to content

Display in content only mode, without ?content_only=1 in a URL


Recommended Posts

Hello,

Just like in a title, is there any way to display contents generated in a module's controller file like they are with ?content_only=1 parameter, but without using that parameter?

For example, I have an iframe displaying survey, and I want to have a webpage:

mydomain.com/survey 

but want it to look like it was accessed after typing:

mydomain.com/survey?content_only=1

Is there any other way to achieve content only page version than by URL?

Kind regards

Link to comment
Share on other sites

Thank you very much for your reply. 

I've actually tried that, however some elements are still displayed (logo, some footer elements), website looks broken, while when using ?content_only=1 it looks perfectly.

There are also some errors, 

Notice: Undefined index: content_only in /home/username/psfolder/tools/smarty/sysplugins/smarty_internal_templatebase.php(157) : eval()'d code on line 200

Notice: Trying to get property of non-object in /home/username/psfolder/tools/smarty/sysplugins/smarty_internal_templatebase.php(157) : eval()'d code on line 200

Have you encountered similar problems before?

Cheers

Link to comment
Share on other sites

Okay, I've just found it out. I had to add:

 

    public $content_only = true;

    public $display_header = false;

    public $display_footer = false;

 

after that it works like a charm.

thank you so much for your help.

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...