2

I am using the Membership Pro plugin on a page, and there is a link to a terms and conditions page that comes from the plugin. I am opening this link in a bootstrap modal which is working great. The problem I am having is that Joomla is loading template.css when this modal pops up, which is causing all my styles on the main page to be messed up.

Is there a way to prevent Joomla from loading this file on certain pages?

4

Modals aree usually loaded using the URL parameter template=component. That means that instead of the regular templates/your_template/index.php Joomla will use templates/your_template/component.php.

This component.php file is supposed to only load the component output without any module positions. Joomla will also only load the CSS files defined there.

  • Okay so maybe I should go into the component.php file and make it so it does not load that css file on the pages i dont want it. – Metropolis Oct 11 '14 at 17:29
  • Yeah I just added an if statement to the component file. Thanks for your help! – Metropolis Oct 11 '14 at 19:19
  • FYI, I know it won't help much since you're using bootstrap, but if you use JCE to create the popup and you choose Internal Link as the link type, it will do this for you. It has the added benefit of loading the CSS styles but not the page container, so your pop up text still looks good. If you end up editing component.php, you might want to add some inline styles there or load a css file if you find your popup isn't styled at all. – Brian Peat Oct 11 '14 at 20:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.