Commit 3470e49e authored by fvtorres's avatar fvtorres

[ENH] Add a new modifier to show CategId instead of Category name. To be used...

[ENH] Add a new modifier to show CategId instead of Category name. To be used inside pretty trackers, in plugins that needs (e.g. prevail category field in tracker plugin)
parent f28b5ccd
......@@ -4042,6 +4042,7 @@ lib/smarty_tiki/modifier.addonnavbar.php -text
lib/smarty_tiki/modifier.adjust.php -text
lib/smarty_tiki/modifier.avatarize.php -text
lib/smarty_tiki/modifier.breakline.php -text
lib/smarty_tiki/modifier.categid.php -text
lib/smarty_tiki/modifier.compactisodate.php -text
lib/smarty_tiki/modifier.countryflag.php -text
lib/smarty_tiki/modifier.dbg.php -text
......
<?php
if (strpos($_SERVER["SCRIPT_NAME"], basename(__FILE__)) !== false) {
header("location: index.php");
exit;
}
/**
* Gets Category Id from the Category name
*/
function smarty_modifier_categid($category) {
return TikiLib::lib('categ')->get_category_id($category);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment