seit längerem versuche ich das Layout für die Produktansicht anzupassen ohne das es die Quickview-Ansicht beeinflusst.
Den folgenden Eintrag habe ich in der PageRegular.php eingetragen, jedoch ohne Erfolg:
Code: Alles auswählen
// change layout for product pages
$pageUrl = \Environment::get('url'); // call url
$isProductview = strpos($pageUrl, 'product') === true; // check if url contains 'product'
$isQuickview = strpos($pageUrl, 'quickview') === true; // check if url contains 'quickview'
if($isProductview && !$isQuickview) { // check if url contains 'product' but not 'quickview'
$objPage->layout = 12; // 12 is the product specific layout id
}
$objLayout = $this->getPageLayout($objPage); // Get the page layout
////////////////////////////////////////
Auch andere Methoden um die URL auszulesen schlugen fehl.
Habt Ihr eine Idee woran das liegen könnte?
Vielen Dank
Christian Banholzer