If I want to set a field as a css value.

More
15 years 11 months ago #3457 by despair
It work!
I have find the problem.
<ul class="<?php if (isset($items[$i]->positions)) : ?><?php foreach ($items[$i]->positions as $field) : ?><?php echo $field->display; ?><?php endforeach; ?><?php endif; ?>">

Sorry! I lose <?php if (isset($items[$i]->positions)) : ?> :oops: :oops: :oops: :oops: :oops:

Please Log in or Create an account to join the conversation.

More
15 years 11 months ago #3458 by despair

Linuus wrote: Hmm.

Do you want each row in the list to have a color?
Then you have to put the code in the <li> tag and not the <ul> tag for starters.

But that doesn't solve the error though.

Can you please copy/paste some more code? Like from a couple of rows before the for loop and a couple of rows after.

EDIT:
Add this before your block as well:
<?php if (isset($this->item->positions)) : ?>

and this after:
<?php endif; ?>

Because if it's empty it might mess the foreach I guess.


Yes!!!...I'm so stupid..
Thank for your help!!!!! :D :D :D

Please Log in or Create an account to join the conversation.

More
15 years 11 months ago #3459 by Linuus
Great!

No problem :)

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline
Save