Jump to content

Processwire alternative template


jsilmarovi
 Share

Recommended Posts

Hello.

I'm developing a project using processwire and I would like to know if processwire offers somekind of approach using an alternative php template file as url parameter?

Example:

I have a template with a text field and a file field. When user clicks on the content, he will see the text and when he clicks on specific button, will show a pdf in file field of same content and render it using a flipbook plugin.

So I tought something like this

Content: http://example.com/content/page-of-content

PDF: http://example.com/content/page-of-content?template=flipbook

Its possible?

 

 

 

Link to comment
Share on other sites

I wouldn't even think about such an invitation for performing dangerous things through a regular get request like invoking "any" templatefile.

If you wish to generate different output depending on a get parameter you are of course free to do so (there is $input->get() to easily retrieve get parameters). Just call a function or execute another conditional block in your template.

  • Like 2
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...