Hello,
As I’ve been asked two times already how to get the ID of the current category being browsed in Clip-Bucket v2, I decided to write an article for it so everyone can learn how do it by themselves. Knowing how to do this, you can display specific advertisement for each category, for example.
1. In the template file, we first need to assign all the category fields to a variable (here we are using variable $cdetails):
<code>{assign var=cdetails value=$cbvid->get_category($smarty.get.cat)}</code>
2. To print any field from the category, we change fieldname from the next code to show our desired field
<code>{$cdetails.fieldname}</code>
3. To print the id
<code>{$cdetails.id}</code>
And there you go! Easy, huh? Endless possibilities for custom applications can be created by using this code! If you have any question, comment, etc, please let me know.
Best Regards,
Richi
Looking for quality ClipBucket Hosting? Look no further than Arvixe Web Hosting!