• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

How to target a specific webapp item

Explorer ,
Feb 19, 2014 Feb 19, 2014

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.

TOPICS
Web apps

Views

445

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 19, 2014 Feb 19, 2014

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 19, 2014 Feb 19, 2014

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 19, 2014 Feb 19, 2014

Copy link to clipboard

Copied

LATEST

It will, it just counts the number of items scott.

<div class="myitem mycount-{tag_counter}">

The first item will be mycount-1

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines