How to display Checkbox images as links?

More
7 years 11 months ago #61618 by lipatovroman
Hi!
How to display Checkbox images as active links?





Thanks.

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

More
7 years 11 months ago #61626 by micker
you can't ... you need to use an list of url field and add image by css i think

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]
The following user(s) said Thank You: lipatovroman

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

More
7 years 11 months ago #61673 by lipatovroman
How to set individual class for each field element?
I use this code for displays element
Code:
<div class="flexi osicons value field_<?php echo $field->name; ?>"><?php echo $field->display; ?></div>
So, elements displays as solid text.
May be I can use Every value prefix for this, but in this case I should have ability to set elements names as class.



In this case, each element can have individual class, same as element value.

But it seems, it is impossible...

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

More
7 years 11 months ago - 7 years 11 months ago #61692 by ggppdk
Hello

the loop that displays the field value is inside a template file:
plugins/flexicontent_fields/tmpl/value_default.php

SO the recommended way for custom display is to create your own layout file:

1. copy the above mentioned file (duplicate it) as:
plugins/flexicontent_fields/tmpl/value_mydefault.php

2. inside field configuration select layout: "mydefault"

3. customize the PHP file: .../tmpl/value_mydefault.php

find line (2 places):
Code:
$html[] = $pretext.$disp.$posttext;
... or (second places has some extra spaces)
Code:
$html[] = $pretext . $disp . $posttext;

and replace it with your custom code:
e.g.
Code:
$my_css_class = $element->value; $html[] = $pretext . '<span class="'.$my_css_class .'">' . $disp . '</span>' . $posttext;


-- 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...
Last edit: 7 years 11 months ago by ggppdk.

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

More
7 years 11 months ago - 7 years 11 months ago #61701 by lipatovroman
Thank you!
It works perfect.
But $my_css_class = $element->value; displays numbers, 0 1 2 3 4 - not values.
So, I replace it with $my_css_class = $disp;
Last edit: 7 years 11 months ago by lipatovroman.

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

More
7 years 11 months ago - 7 years 11 months ago #61725 by ggppdk
Hello

so you want the label, yes now i see the picture that you have posted

so instead of this:
Code:
$my_css_class = $element->value;

use this to get the label:
Code:
$my_css_class = $element->text;

if you want to see what is available then do:
Code:
echo "<pre>"; print_r($element); echo "</pre>";


-- 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...
Last edit: 7 years 11 months ago by ggppdk.

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

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