Can You Call to a Different Page Template Than What's Assigned? CMS 9.1.3

I am using ConcreteCMS 9.1.3 and PHP 8.1.
I am wondering if there is a way to use a different Page Template than what it set up in Page Settings > Design?
Like I have a full page template set for a product, now I’m wondering if there is a way to code it so it uses a different page template for the same page, but not change the page template.
Does this question make sense? I am trying to make a custom lightbox without showing the full page in it.

I’m not sure I understand the use case. Are you talking about programmatically re-assigning the page to a new page template ‘on the fly’?

Yes, that would be it.

Well, any change in the page template would require a reload of the page from the server so I’m not sure it’s very helpful. Lightboxes generally open over top of the existing page so what ‘flow’ are you aiming for?

I think that would still work, because it should all load in the page when it first loads, if it can do what I need.

If you click on the Free Shipping map image it loads the stock lightbox.
If you scroll down the page a little further you’ll see 6 products. If you click on the image of any of those it is a different looking lightbox. I’d like them to simply match. I can make a lightbox, but it loads the full page, like if you click on More Details. But if I could change the page template I believe all the info I need would still be there, without the full page showing, like in the Free Shipping lightbox.

Did I explain this well enough?

So, lightboxes work inside the browser via JavaScript. Page templates are used by the server to render the page and they ‘fire’ way back before the page ever reaches your browser so changing the page template will require another visit to the server to reload the page. Isn’t the mismatch between the two lightboxes simply a matter of using the identical ‘blocks’ or the identical settings withing the same block?

It is how the product lightbox are made. I have no idea how to change it. When I try I get the full page. I was hoping my idea was something easy. I tried and thank you very much for your time.

So, it looks like the products at the bottom are using the built-in Community Store lightbox which is different than the lightbox the map is using. Maybe add a ‘product’ called ‘Map’ to your Community Store and use the map image as it’s product image and then add the Map ‘product’ to the top where the map is now?? Just thinking out of the box. :grinning:

Another approach which may be of help. My Universal Content Puller addon provides a block which (amongst many possibilities) can pull an area (or part of an area) of one page into another page.

So you could create a second page with your desired template, then use UCP to pull in the fragments of the first page you want to show.

You could do similar with stacks, having your content in a stack and adding the stack to pages with each template.