Welcome, Guest
Username Password: Remember me

Overriding template when layout is defined in link
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: Overriding template when layout is defined in link

Overriding template when layout is defined in link 11 years, 10 months ago #13447

So I can't get my template override to display for a certain page because in the menu link to that page:

index.php?option=com_content&view=category&layout=oneshow:events&id=11


the "layout" query there causes it to display the default template settings for my "com_content" overrides instead of my mobile template overrides.  Any way to overcome this?  Thanks!

Re: Overriding template when layout is defined in link 11 years, 10 months ago #13513

  • dryabov
  • OFFLINE
  • Administrator
  • Denis Ryabov, Lead Developer
  • Posts: 4867
  • Karma: 105
As template name is hardcoded in such a way, the only solution is to have two layouts in your events.php layout, smth like

 
<?php
defined('_JEXEC') or die;
if(!defined('_MJ')){
 
// desktop code
 
} else {
 
// mobile code
 
}
 
  • Page:
  • 1
Time to create page: 0.13 seconds

By continuing to use this site you consent to the use of cookies on your device as described in our cookie policy unless you have disabled them. This site will not function correctly without cookies.

I accept cookies from this site.