Siddhi Jagtap Posted October 6, 2021 Share Posted October 6, 2021 Hello All, I am trying something here but I am not sure if its possible. I have a Gallery page(gallery.php) using the 'gallery' template. However I want two views of the Gallery page. One with the navbar and one without. Is it possible to use the same gallery page and make this work? Thanks in advance. Link to comment Share on other sites More sharing options...
kongondo Posted October 6, 2021 Share Posted October 6, 2021 25 minutes ago, Siddhi Jagtap said: Is it possible to use the same gallery page and make this work? Yes. From your description, it sounds like you want you page to display differently depending on the view port (?) and/or device (?) it is being viewed on. In that case, you can accomplish that using CSS (apologies; I am not sure about your coding capabilities, so please, ignore me if you knew this already :-)) and JavaScript (most likely, optional). On the other hand, if what you actually meant is you want ProcessWire to output different gallery page views depending on some condition, then the answer is a tentative yes. We'd need to know what that condition is first. Maybe you could explain your use case? My feeling though is that you are referring to client-side conditions as opposed to server-side. Link to comment Share on other sites More sharing options...
Siddhi Jagtap Posted October 6, 2021 Author Share Posted October 6, 2021 21 minutes ago, kongondo said: Yes. From your description, it sounds like you want you page to display differently depending on the view port (?) and/or device (?) it is being viewed on. In that case, you can accomplish that using CSS (apologies; I am not sure about your coding capabilities, so please, ignore me if you knew this already :-)) and JavaScript (most likely, optional). On the other hand, if what you actually meant is you want ProcessWire to output different gallery page views depending on some condition, then the answer is a tentative yes. We'd need to know what that condition is first. Maybe you could explain your use case? My feeling though is that you are referring to client-side conditions as opposed to server-side. I basically want to output one view for our website and then use another view(without navbars and stuff) for our app. We will just be linking the URL of the second view to our app. Link to comment Share on other sites More sharing options...
Pixrael Posted October 6, 2021 Share Posted October 6, 2021 You can use the urlSegments to choose which html code to output in the template file, it can be with the code directly or with file include. https://processwire.com/docs/front-end/how-to-use-url-segments/ 1 Link to comment Share on other sites More sharing options...
Siddhi Jagtap Posted October 6, 2021 Author Share Posted October 6, 2021 29 minutes ago, Pixrael said: You can use the urlSegments to choose which html code to output in the template file, it can be with the code directly or with file include. https://processwire.com/docs/front-end/how-to-use-url-segments/ I took a look at it and found it really confusing. Will try reading it again. Thanks. 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