LISE Population for classes?

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
rbaby
Forum Members
Forum Members
Posts: 144
Joined: Thu Feb 07, 2008 10:28 pm

LISE Population for classes?

Post by rbaby »

So I am using bootstrap and I want to generate how many numbers there are in the list so that it can assign how many columns there should be and generate the proper number:

i.e. class="col-md-#" and # be populated by how many there are in the list...what's the best way to do this?

Also, how do I assign a class based a drop-down so I can set it as "default" or "featured" and if it's set to featured, it would add class="featured"? Will it work if I just called the custom field name and it would populate it with the value?

Thanks in advance for any guidance.
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3484
Joined: Mon Nov 28, 2011 9:29 am
Location: The Netherlands

Re: LISE Population for classes?

Post by velden »

Though I think you don't want it this way you can easily get the number of items. From the sample summary template:

Code: Select all

{if $items|@count > 0}

Code: Select all

 class="col-md-{$items|@count}
Also, how do I assign a class based a drop-down so I can set it as "default" or "featured" and if it's set to featured, it would add class="featured"? Will it work if I just called the custom field name and it would populate it with the value?
Yes, did you try it?
Post Reply

Return to “Modules/Add-Ons”