I want to write a simple condition that states if a AND b are true then add x ElseIf… a AND c are true then add x ElseIf just do this. (I really hope that makes as much sense in writing as it does in my head.
The current code is:
if($layout == "carousel") {
$document->addStyleSheet($modbase.'css/stylev1.css');
$document->addScript($modbase.'js/jqueryv1.js');
}
Basically I want it to do this…
if($layout == "carousel" AND BODyID IS B) {
$document->addStyleSheet($modbase.'css/stylev1.css');
$document->addScript($modbase.'js/jqueryv1.js');
}
Else if ($layout == "carousel" AND BODYID IS C) {
$document->addStyleSheet($modbase.'css/stylev2.css');
$document->addScript($modbase.'js/jqueryv2.js');
}
But as you can see I’m not entirely sure what the exact code would look like.
Just write out your sentence in code and you are golden!