[Résolu] Label conditionnel

More
8 years 1 month ago #60699 by hervemlam
Replied by hervemlam on topic Label conditionnel
Salut,

C'est bon, j'ai réussi en faisant comme tu as dit.
J'ai ajouté un champ radio C2 à mon type.
C2 contient les valeurs d'étiquettes à mettre devant l'affichage de C1.
J'ai glissé ce champ en position renderonly de mon template.
Enfin, j'ai modifié le code du item.php de mon template de la façon suivante :
Code:
<?php if ($field->label) : ?> <span class="flexi label field_<?php echo $field->name; ?>"> <?php if ($field->name=='C1') { echo $item->fields['C2']->display; } else { echo $field->label; } ?></span> <?php endif; ?>
Bonne nuit.
HervE

PHP 8.1.16
Joomla! 4.3.3
FLEXIcontent 4.1.5

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

More
8 years 1 month ago #60710 by micker
Replied by micker on topic Label conditionnel
nikel bravo

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]

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

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