Custom Html for a relation field

More
2 years 10 months ago #81376 by Chabi01
Hi everybody,
I have a little question about html in a relation field.

To get a beautiful list of my item in relation, I use the html field.
I dont paste you all the code, but a part of this code isi :
Code:
<div style="clear:both;">   {{couleurslistes}} +{{complementcouleur}}   </div>
This show me list of color (couleurlistes) and after this a "+" followed by a test (complementcouleur).

The thing here is : if I dont have value in "complementcouleur", I see then the list of color followed by the "+" but without anything after.

My question is then : how can I test if the value "complementcouleur" is not empty to set a condition in the html code to tell "If complementcouleur is not empty, then show the "+" followed by the value, otherwise, dont show anything.

Thanks for the help :)
Xavier

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

More
2 years 10 months ago #81380 by micker
you could do real condition without coding a template in php for relation field
but you can use prefix of complementcouleur and add + inside
=> + will be display only if complement color isn't empty

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

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

More
2 years 10 months ago #81381 by ggppdk
Hello

Flexicontent v4.0.0 has option for custom layout file(s) for relation field


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

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

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.469 seconds
Save
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