How to Retrieve the ID of the Current Category in Clip-Bucket v2

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-&gt;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!

Tags: , , , , , , , , , , , , , , | Posted under ClipBucket | RSS 2.0

Author Spotlight

Richi González

Richi González

I started programming when I was 12. I'm a Developer and have been working with the Clip-Bucket script since it came out. I'm the Liaison between Arvixe and Clip-Bucket, so anything you need regarding Clip-Bucket or any particular computer-related subject you need, let me know so I can assist you.

Leave a Reply

Your email address will not be published. Required fields are marked *


1 × 5 =

You may use these HTML tags and attributes: <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>