[Explanation, how to customize all html] Template Override for Fields, Not Just Field Values?

More
6 years 2 months ago - 6 years 2 months ago #74808 by Dave LeDev
Is there currently a method of customizing the output of an individual field as a whole and not just the field's values? Looking at Edit Field > Viewing > Layout, the only options available for an override that I can find are the values themselves.
Last edit: 6 years 2 months ago by ggppdk.

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

More
6 years 2 months ago - 6 years 2 months ago #74809 by ggppdk
Hello

i am not sure that i understand you

the viewing layout creates 100% of the HTML
- the above is excluding the value prefix / suffix

Explanation

1. you can configure empty value preffix / suffix,
and then inside layout prepend and append to values anything you want

2. also for HTML before value list and after value list just use the parameters

3. Furthermore If there is some variable with pre-created HTML just not use it, just create your own replacement for it

Note that the
Code:
$field->values
are almost the raw field value, except for the manipulation that you have configured inside the field !!

But to access the raw field values use:
Code:
$item->fieldvalues[$field->id]


-- 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: 6 years 2 months ago by ggppdk.

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

More
6 years 2 months ago #74831 by Dave LeDev
If I'm understanding correctly (likely not), it seems whatever solution exists affects all or nothing. Here's a screenshot of what I'm trying to edit:



The positions marked with an orange circle are the text fields themselves; I'm not trying to stylize values of a field in this case.
What I aim to do is create an opening DIV at the first field and a closing DIV at the end of the second field, creating a container. As far as I know, and just thought of after re-reading your reply for the Nth time, I would need some kind of conditional statement placed within my layout's item_html5.php (forced use; not bothering with xhtml output) at whatever position I have these fields to style them differently.

This is the change I'm trying to achieve:


Adding two fields inside a container.

So do I have it right that  the proper solution lies within editing the template?

If only I could control this at the field itself; if I ever have to change positions or layout, I have to recreate the conditional statement. A template override of the entire field would be useful.

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

More
6 years 2 months ago #74837 by ggppdk
Hello

1. to structure field's HTML of the values
you can use custom inside a custom viewing layout
(you can use multiple layouts to so that no all field of type AAA have the same display)

2. to effect the field label use CSS and / or  edit  item.php template file

3. to effect the container that contains
field 's label
field 's HTML display
use CSS and / or  edit  item.php template file


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