selecting Value AND Label in a field

More
12 years 4 months ago - 12 years 4 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: 12 years 4 months ago by hede.

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

More
12 years 4 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 review. Thanks!

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

More
12 years 4 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
12 years 4 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
12 years 4 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 review. Thanks!

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

More
12 years 4 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.

More
12 years 4 months ago #41415 by ggppdk
Hello

1. this is will create broken HTML in the output,
do a "view page source" in browser to see it
please fix it

2. i asked for the variables open/close field and not prefix/suffix of every value

you have set separator to use these
anyway please note that it is very unlikely to be a bug there this is tested, and stable of quite some time

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 review. Thanks!

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

More
12 years 4 months ago #41419 by hede
First my apologies - I misunderstood this option. I assumed the Value separator (frontend views) refers to the values in Prefix text of every value because the drop down sits closer to these fields than to the Opening text for Field fields (maybe the UI can be cleaned here so it does not happen to others too).

My setup does not produce any broken HTML code. Where do you see some? It turns out to be valid and is as I expected - The labels extend the CSS class definition. What is wrong with that?

I solved my issue by using the linebreak as a separater because I can set this to "display:none" when the label containing divs are displayed, and at the same time now the values are separated.

I set this thread to solved.

Cheers

FF on Win10, FLEXIcontent version 3.0.10 on Joomla 3.4

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

More
12 years 4 months ago #41421 by ggppdk
Hello

if you want to set it no separator , then there is an option in all built-in fields (checkbox, selectmultiple, etc):

empty (no character)

is this not a built-in 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 review. Thanks!

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

More
12 years 4 months ago #41438 by hede

empty (no character)
is this not a built-in field?

Yes, it is. But that leads to making this:
Code:
$item->fields['wind_direction']->display_index
useless, because it displays:
12346
instead of
1,23,46 (or now in my case 1<br>23<br>46)

Cheers

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