selecting Value AND Label in a field

More
11 years 8 months ago - 11 years 7 months ago #41375 by hede
In "Field specific properties - Frontend display" of a field I would like to be able to select Value AND Label. Currently only OR is possible.

Cheers

FF on Win10, FLEXIcontent version 3.0.10 on Joomla 3.4
Last edit: 11 years 7 months ago by hede.

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

More
11 years 7 months ago #41385 by ggppdk
Hello

yes, this option is not available in the fields, you might do it:
if your field is single value with custom template:
(set your field to display LABEL of VALUE instead and not VALUE)
Code:
echo $item->fields['myfield41']->values[0] . $item->fields['myfield41']->label;

above "values" may not exist or maybe different,

do
echo "<pre>".print_r($item->fields, true)."</pre>";

to make sure it exists

otherwise you cannot do it

Regards


-- 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.

More
11 years 7 months ago #41397 by hede
Thanks for the hint. I am able to retrieve LABEL and VALUE with a custom template for the item view. But I am not able to do that in a custom template for mod_flexicontent. The mod_flexicontent delivers only LABEL or VALUE, never both.

FF on Win10, FLEXIcontent version 3.0.10 on Joomla 3.4

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

More
11 years 7 months ago #41401 by hede
There is a bug in the field output: When setting Value separator (frontend views) to "Convert Opening/Closing Texts to Separator" I see this:

current: [display_index] => 12346

but I would expect: [display_index] => 1,23,46

So I guess it needs to be fixed like
IF (no suitable separator is found) {use ",";}

FF on Win10, FLEXIcontent version 3.0.10 on Joomla 3.4

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

More
11 years 7 months ago #41403 by ggppdk
Hello

please mention what you have entered in these parameters

what have entered in opening and closing text?


-- 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.

More
11 years 7 months ago #41410 by hede
Prefix text of every value:
Code:
<div class="spoticon winddirection
Suffix text of every value
Code:
"></div>
Value separator (frontend views) to "Convert Opening/Closing Texts to Separator"

FF on Win10, FLEXIcontent version 3.0.10 on Joomla 3.4

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

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