[Beta 4] charger un groupe dans un template

More
14 years 5 months ago #626 by micker
hello a tous voila
dans mon template j'essaye de charger un groupe de valeurs pour reconstituer un appel plugin mais si je charge les 2 valeurs l'appel ne fonctionne pas ...
il me faut donc charger le groupe carte qui est constituer du champ carte1 et carte2
mais dès que je fait mon appel j'ai une page blanche
Code:
<?php // bottom block if ($this->fields) : $i = 0; foreach ($this->fields as $field) : if (in_array('carte'.$tmpl, $field->positions) && $field->value) : $i++; endif; endforeach; if ($i > 0) : ?>
j'ai faux mais je sait pas où
Merci par avance

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.

More
14 years 5 months ago #633 by vistamedia
Dans la beta4, j'ai introduit une simplification considérable des boucles qui sont maintenant faites en amont.
Code:
<!-- BOF mon_bloc --> <?php if (isset($items[$i]->positions['mon_bloc'])) : ?> <div> <?php foreach ($items[$i]->positions['mon_bloc'] as $field) : ?> <span class="element"> <?php if ($field->label) : ?> <span><?php echo $field->label; ?></span> <?php endif; ?> <span><?php echo $field->display; ?></span> </span> <?php endforeach; ?> </div> <?php endif; ?> <!-- EOF mon_bloc -->

Ce type de syntaxe devrait éviter un paquet d'erreurs ;-)
Ensuite de manière plus générale, il faut activer l'error_reporting de PHP pour avoir des infos au lieu d'une page blanche.
JAMAIS SUR LE SITE EN PRODUCTION mais en environment de développement c'est indispensable, sinon tu es en aveugle.

Bon courage,
Manu.

FLEXIcontent lead developer.
www.vistamedia.fr web agency and custom development.
www.joomla.fr co-administrator.
Please no PM for support request, use the forum for that!!!

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

More
14 years 5 months ago #636 by micker
ok merci je suis encore en local ....
je bosse sur un site .gouv.fr fait a partir de flexicontent ! ca vas tout casser !

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.

More
14 years 5 months ago #637 by micker
hello je viens de tester ca ne fonctionne pas....
Code:
<!-- BOF carte --> <?php if (isset($items[$i]->positions['carte'])) : ?> <div> <?php foreach ($items[$i]->positions['carte'] as $field) : ?> <span class="element"> <?php if ($field->label) : ?> <span><?php echo $field->label; ?></span> <?php endif; ?> <span><?php echo $field->display; ?></span> </span> <?php endforeach; ?> </div> <?php endif; ?> <!-- EOF carte -->
l'idée étant de charger la position carte de le code executer je vois juste les commentaire mais rien à l'interieur ...
j'ai essayer de mettre mes champs dans la partie bottom et la ca fonctionne (sauf que ca fait une liste mais ce la prouve que mes champs sont bon)
Merci d'avance
des idées

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.

More
14 years 5 months ago #663 by micker
hello je repasse par la pour voir si qqun à une solution
Merci

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.

More
14 years 5 months ago #734 by micker
hello alors suite à notre discution j'ai continuer à chercher
avec ce code la position carte ne me renvoie rien
Code:
<!-- BOF carte0 --> <?php if (isset($items->positions['carte'])) : ?> <div> <?php foreach ($items->positions['carte'] as $field) : ?> <span class="element"> <?php if ($field->label) : ?> <span><?php echo $field->label; ?></span> <?php endif; ?> <span><?php echo $field->display; ?></span> </span> <?php endforeach; ?> </div> <?php endif; ?> <!-- EOF carte0 -->
Après j'ai essayer en récupérant le code de la description, là les champs ce charge bien mais il y a un x espace entre les 2 valeurs donc l'appel ne fonctionne pas ...
Code:
<?php if (isset($this->item->positions['carte'])) : ?> <!-- BOF carte2 --> <?php foreach ($this->item->positions['carte'] as $field) : ?> <?php if ($field->label) : ?> <?php endif; ?> <?php echo $field->display; ?> <?php endforeach; ?> <!-- EOF carte2 --> <?php endif; ?>

qu'ai je louper ?
Merci

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