[solved] Customizing field display with some personal text

More
13 years 3 months ago - 13 years 3 months ago #17619 by loicberder
Hello,

i have customized the template to put some specific text close to the field value in a block (it haven't to depend of the field in the template position ; it is specific displaying regarding to the fields value)...
that was working well

the only thing i remember to have done is upgrade to flexicontent 1.5.5 and then back to 1.5.4 because of errors / but maybe it is not that...

NOW it is not working except if i put one of the fields concerned in the position (that cause duplicate and disgrace displaying)

hope you can understand my english...

here is my code
Code:
<!-- BOF subtitle3 block --> <?php if (isset($this->item->positions['subtitle3'])) : ?> <div class="lineinfo subtitle1"> <b><span class="element"> <?php echo $this->fields['difficulte']->display; echo ' de ';?> <?php $duree = $this->fields['nb_jours']->display; if(ereg("0,5","$duree")) {echo $this->fields['nb_h_marche']->display; ?> </b></span> <span class="element"></span> <?php } else { if(ereg("1","$duree")) {echo '1 journ&eacute;e'; ?> </b></span> <span class="element"></span> <span class="element"> <span class="value field_<?php echo 'nb_h_marche'; ?>"><?php echo $this->fields['nb_h_marche']->display; ?> </span> </span> <?php } else {echo $this->fields['nb_jours']->display;} ?> </b></span> <span class="element"></span> <span class="element"> <span class="value field_<?php echo 'nb_h_marche'; ?>"><?php echo $this->fields['nb_h_marche']->display; echo ' (moy/jour)'; ?></span> </span> <?php } ?> <?php foreach ($this->item->positions['subtitle3'] as $field) : ?> <span class="element"> <span class="value field_<?php echo $field->name; ?>"><?php echo $field->display; ?></span> </span> <?php endforeach; ?> </div> <?php endif; ?> <!-- EOF subtitle3 block -->

some explaination :
difficulte + " de "
if nb_jours=0,5 display "0,5 jour" + nb_h_marche
if nb_jours=1 display "1 journée" + nb_h_marche
if nb_jours>1 display nb_jours + "journées" + nb_h_marche + "(moy/jour)"
also display more fieds if they are in this position
Last edit: 13 years 3 months ago by loicberder.

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

More
13 years 3 months ago #17621 by ggppdk
After going back to 1.5.4 did you change any files?
Maybe you have the new flexicontent.fields.php file in your system. If this is the case the field not in a template position will not be created.

Try this edit item.xml and category.xml of your template and add a new template position named "renderonly"
Like this:
Code:
<fieldgroups> ... <group>renderonly</group> <fieldgroups>

--> CLEAN JOOMLA CACHE and go to edit template
--> Add your fields in this position, now your fields will be rendered but not output in the template (because position renderonly doesnot exist in the .php files)

Now you custom template should work.

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 #17623 by loicberder
waooo direct support
you are awesome

Done but it is not working

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

More
13 years 3 months ago #17625 by ggppdk
It just happened that i logged this time i could be away for 2 days ...

If the fields are working when you place in a position then doing what i suggested should work

Please check everything, after creating position, did you clean cache and then edit the ITEM view of the template and you should see the new position there.

Did you drag and drop the fields in the position?
Is it the correct template etc ...

Please check if you place in other position and it works it should work by placing to the new 'renderonly' 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.

More
13 years 3 months ago #17629 by loicberder
hello,
cache cleaned again
checked and re checked position, template...

sorry it doesn't change
working and not working as before

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

More
13 years 3 months ago #17631 by ggppdk
So if you put in any template position it is working, but it does not if you put in the new position?


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