Copy link to clipboard
Copied
Hi all,
Can I target a specific webapp item? Forexample I have a content holder that has three places for news information, but the css is slightly different on the last two items. So my two thoughts are to eith specifically target webapp items (ie date) in the three css areas or can/should I do this using a backup list for the last 2 items? I want them to display newest to oldest. Will using a backup list keep my date sorting the same or will it start it over again? Is there a way to tell BC to always display the second latest and then thrid latest item (like you can with the latest item)?
Thanks.
Copy link to clipboard
Copied
Hi there.
Well there is lots of ways you can do this depending on the exact things you want to do.
You have {tag_itemid} you can use to form unique classes, You got {tag_counter} on list view that you can use to render something like ns-1,ns-2,ns-3 etc to target with your CSS.
You got :first-child and :last-child in CSS you can use and you also have nth child in css as well.
Copy link to clipboard
Copied
Thanks Liam. How do I use the {tag_counter} to display a specific item? I always want tag_counter=1 to be in the first position (with its custom css) and likewise, tag_counter=2 to be the second and tag_counter=3 to be the third. Can I somehow use the {tag_counter} to tell the page which item to render and where?
-Scott
Copy link to clipboard
Copied
It will, it just counts the number of items scott.
<div class="myitem mycount-{tag_counter}">
The first item will be mycount-1