jsilmarovi Posted March 19, 2019 Share Posted March 19, 2019 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 More sharing options...
Autofahrn Posted March 19, 2019 Share Posted March 19, 2019 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. 2 Link to comment Share on other sites More sharing options...
Zeka Posted March 19, 2019 Share Posted March 19, 2019 @jsilmarovi Or you can use URLSegments if you want to reduce the number of pages but still output different markup. 3 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now