You need to be logged in to post in the forum - Log In

An active JCE Pro Subscription is required to post in the forum - Buy a Subscription

Support is currently Offline

Official support hours
Monday to Friday
09:00 - 17:00 Europe/London (BST)

Please create a new Ticket and we will get back to you as soon as we can.

#104141 Stop forced "?tmpl=component" on mediabox modal popups

Posted in ‘Mediabox’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Latest post by Ryan on Saturday, 09 May 2020 14:20 BST

wbuk
We are currently using JCE Mediabox popup modals with Gantry 5 Joomla templates (which allows custom scripts and CSS to apply to individual pages).

When a modal popup link is created, the page within the iframe forces "?tmpl=component". This results in custom javascripts and even CSS to be removed from the modal popup's page. This occurs even when a page for Joomla extension (not article) is viewed.

But when a link within the modal popup is clicked, the "?tmpl=component" is not applied anymore.

Is there a way to stop JCE Mediabox from adding "?tmpl=component" to the modal's page? I understand the need for it when viewing articles, but it does that to extensions' pages as well.

Ryan
Without the ?tmpl=component added to the url, the whole site would be displayed in the popup (including all modules, menus etc.), instead of just the intended article content.

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

wbuk
Some templates (eg Gantry5) allow you to remove certain parts (eg sections, header, footer, modules,etc) off specific pages. We don't need Joomla's component-only view as it's very limiting.

By forcing ?tmpl=component, every module gets removed and we can't have a custom module (or even custom css) in the modals when used to open other extension's pages, for example. There's no way around it.

Ryan
Local urls must be default only open the intended content, without the need for additional variables.

To accomodate an alternative, as in your case, I have made it possible to have skip processing of local urls in this way if the url contains an existing tmpl variable, eg: &tmpl=index

You can test this in JCE MediaBox 2.1.2 Beta 1 - https://www.joomlacontenteditor.net/downloads/mediabox/development

So, for your popup content, add &tmpl=index to the url.

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.