PDA

View Full Version : Category Conditional Token?


Scott Poliseno
04-04-06, 06:14 AM
Is there a conditional token to display only if the category has products?

Thanks,

Scott

Vic - WolfPaw Computers
04-04-06, 07:45 AM
There isnt a real easy way to do this.

You'd likely have to use the Category_Product_FindNext_Assigned (PARAMETERS = "cat_id, offset, search" ) function, passing the category id (after doing a Category_Find_Code to return Categories.d.id), to set up a conditional based on a "0" return value...meaning there is no next assigned product.

Scott Poliseno
04-04-06, 07:49 AM
Thanks Vic... Does Vic ever sleep.. . I think you must have written a robot to answer all of these questions for you... :)

Yeah... I think the easiest thing here is to asign different category templates through Viking Module... Then it will display how I want...

Thanks Vic!

Vic - WolfPaw Computers
04-04-06, 07:57 AM
Plenty of time to sleep when I'm dead :)

DesignExtend-MSI
04-04-06, 06:50 PM
Yeah... I think the easiest thing here is to asign different category templates through Viking Module... Then it will display how I want...

You don't have to. There are tokens for the template modules to display content ONLY if the category has products assigned, and vice versa. Checkout the file here:

http://www.mikeworks.com/docs/newtokens.txt

Scott Poliseno
04-04-06, 06:58 PM
Thanks Pamela!! I checked that document but somehow missed the has not products token...

Scott