I've added a couple of variables in the library. One is called 'New' which has a true/false value. What I want to do to just show the normal Section Link within a Box layout when the value is false, but show a slightly different layout when the value is true. (Basically, I want to stick a 'New' icon over the top of the box) Has anyone done or seen this done anywhere?
Announcement
Collapse
No announcement yet.
Variable dependant section box
Collapse
X
-
Thanks Duncan, I got this working a treat with this little bit of code:
Code:<actinic:block if="%3cactinic%3avariable%20name%3d%22Sale%22%20%2f%3e" ><div class="icon_sale"><img border="0" src="images/icon-sale.png"></div</actinic:block>
Find all products where sale = true
Display all products in sale section
(This to saving having to duplicate them all again. Or is the only way of doing this simply to add product duplicates?)Cheers
Stuart
Comment
-
Yes, create a section for the sale items. In that section place any dummy product. Create a new Product List Layout. In that place a Section List, Product List and Blockif test. Inside the Blockif test place a product layout.
Code:<actinic:block type="EntireSectionList" > <actinic:block type="ProductList" > <actinic:block if="My variavble test for TRUE" > My Product Layout </actinic:block> </actinic:block> </actinic:block>
The code I have given will need modifying with your own test and product layout of course.
This is also documented elsewhere in the forum in more detail.
Comment
Comment