Skip to content

Instantly share code, notes, and snippets.

@fastnetwebdesign
Created December 17, 2014 16:55
Show Gist options
  • Save fastnetwebdesign/d57eb68d74142832ea36 to your computer and use it in GitHub Desktop.
Save fastnetwebdesign/d57eb68d74142832ea36 to your computer and use it in GitHub Desktop.
Dynamically load article template based on category ID
switch ($this->item->catid)
{
case('9'):
case('11'):
echo $this->loadTemplate('inset');
break;
case('10'):
echo $this->loadTemplate('news');
break;
default:
echo $this->loadTemplate('article');
break;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment