Skip to content

Instantly share code, notes, and snippets.

@thetemplateblog
Created March 30, 2014 14:47
Show Gist options
  • Save thetemplateblog/9873767 to your computer and use it in GitHub Desktop.
Save thetemplateblog/9873767 to your computer and use it in GitHub Desktop.
Read module params
jimport( 'joomla.application.module.helper' );
function getParam( $module, $attribs ) {
$modules = JModuleHelper::getModules( $module );
$params = json_decode($modules[0]->params);
$param = $params->$attribs;
if (strpos($param,'contain-to-grid') !== false) {
$param = 'contain-to-grid';
}
else {
$param = 'row';
}
return $param;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment