[solved] Customizing field display with some personal text

More
13 years 3 months ago #17635 by loicberder
no i need to put the fields in the position i use to display the values... where my php script is

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

More
13 years 3 months ago #17637 by ggppdk
Oh i see now, you put some code for display the fields as you like

--> but did you remove the loop that displays them automatically ??????

--> otherwise they will be outputed twice


-- 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
13 years 3 months ago #17638 by loicberder
yes at the end of the script i put the loop to display others fields

this doesn't affect the script ; i have tried with or without the loop

maybe something not correct in the script ?

all the script in my first message... see an extract below :
Code:
<?php $duree = $this->fields['nb_jours']->display; if(ereg("0,5","$duree")) {echo $this->fields['nb_h_marche']->display; } else { if(ereg("1","$duree")) {echo '1 journ&eacute;e'; ?> </b> <span class="element"> <span class="value field_<?php echo 'nb_h_marche'; ?>"><?php echo $this->fields['nb_h_marche']->display; ?>

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

More
13 years 3 months ago #17642 by ggppdk
Every position has a loop to display fields assigned to the position if you printing fields with some custom code take care to print them twice.

By this i mean to find the position inside the template and put the loop that prints fields of the position inside php comments /* */

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
13 years 3 months ago #17646 by loicberder
Hello,

Done and it is working !...
thanks

in fact :

- using fields in a script in a template position without putting them in that position is not working

- publishing fields in the new 'renderonly' position solution is not working

- using fields in a script in the template position where they have been putted (backend) in the template IS WORKING

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

More
13 years 3 months ago #17648 by ggppdk
When is said to create the 'renderonly' position, i thought you were using a newer version of flexicontent.fields.php

Then i realized you did not and had also left the loop that displays fields of the position inside the template.

If using not using the newer flexicontent.fields.php (from FC v1.5.6), you could have used:

$this->item->fields->display

to display your data without putting your fields in any position.

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.

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