Login or create new account.

By registering on joomprod.com, you will have immediate access to all our free products and to the public side of our support forum.

Enjoy our subscriptions.

Each of our subscriptions allow you to enjoy the private side of the support forum and all the update of our products for a period ranging from 3 months to 1 year.

Payment And immediate download.

After subscribing to one of our subscription, the products are immediately downloadable.

Login

Or Register
Accueil / forum / Public Forum / Main Forum / champs avec couleur

Support Availability Because we must sleep sometimes

Working days: Monday to Friday.
Reply time: Depending on the complexity of your support issue it's usually between a few hours to 48 hours.

Support is only guaranteed to paid subscribers

AdsManager - End of life

It is with great regrets that we have chosen to end the developpement of Adsmanager and its other associated components.

AdsManager is born 10 years ago and, as of today, the number of new subscriptions and downloads have fallen and we cannot maintain the component anymore.

All active subscribers will be able to continue enjoying support until the end of their subscription.

The components will be free and no support will be provided anymore for the other users.

×

Notice

The forum is in read only mode.

× OLD Forum post could be checked here : forum.joomprod.com

champs avec couleur

More
8 years 5 months ago #22541 by jamalqc
champs avec couleur was created by jamalqc
Bonjour, je me demande s'il y a un moyen de créer un champs (single select list ) et de l'afficher en couleur différente selon le statut.

par exemple quand l'annonce est active, la valeur est vert sinon vendue en rouge...
Statut: Active
Statut: vendue

J'ai essayé le override de joomla d,habitude je peux utiliser les html mais pour cette fois ci il n,accpete pas :) merci
More
8 years 5 months ago #22553 by loic
Replied by loic on topic champs avec couleur
Bonjour,

Une solution serait de rajouter un peu de php.
Par exemple, si votre champs à deux valeurs possible 'active' et 'vendu', vous pouvez faire quelque chose comme :
<?php
if ($valeurduchamp == 'active) {
    $color = 'style="color: green"';
} else {
    $color = 'style="color: red"';
}
?>
<span <?php echo $color; ?>>{affichage de la valeur du champs}</span>

Cordialement.
The following user(s) said Thank You: jamalqc
More
8 years 5 months ago #22569 by jamalqc
Replied by jamalqc on topic champs avec couleur
Merci pour la réponse. Pour le code je peux l’intégrer dans un fichier ou je dois créer un nouveau fichier quelques part ? merci :)
More
8 years 5 months ago #22586 by loic
Replied by loic on topic champs avec couleur
Bonjour,

Si vous souhaitez l'afficher dans la liste, alors il faut faire un override de la vue components/com_adsmanager/views/list/tmpl/default_list.php.
Si vous souhaitez l'afficher dans le details, alors il faut faire un override de la vue components/com_adsmanager/views/details/tmpl/default.php.

Voici un lien pour vous aider à faire un override - www.joomprod.com/support/doc/customizati...c-view-override.html

Cordialement.
More
8 years 5 months ago #22632 by jamalqc
Replied by jamalqc on topic champs avec couleur
Un grand grand merci!!
More
8 years 5 months ago #22637 by loic
Replied by loic on topic champs avec couleur
Pas de problème :)
Moderators: perry
Time to create page: 0.523 seconds
Powered by Kunena Forum