What version of 68 Classifieds are you running? Example: V4.1.6 developre What template are you using? Please describe in detail the issue you are having:[/] Someone Know how to get category Id in viewlisting.tpl?
if you use smarty debug console you should see the variable section which should correspond to your categoryid.
Thanks Larry, I already did it and I only found the variable $categoryname, I also tried to create a plugin: PHP: function smarty_function_categoryid($params, &$smarty) { global $db; $catname = ''; foreach ($params as $_key=>$_value) { switch ($_key) { case 'catname': $$_key = $_value; break; } } $sSQL = "SELECT id FROM ".PREFIX."categories WHERE name=".$catname; $result=$db->query($sSQL); if($result->isError()) { return false; } if($result->size()>0) { $rs=$result->fetch(); $catid = $rs['id']; } $result->freeResult(); return $catid; } But I got this error: Notice: Query failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' Collectibles' at line 1 SQL: SELECT id FROM class_torcategories WHERE name=Art, Collectibles
Sorry Larry I didn't get you. I'm trying to do this. if the Ad is featured show something Someone know the variable featured in viewlisting.tpl