Top/image à doubler

More
5 years 11 months ago #75431 by Teamherve
Bonjour,

Comment ajouter des positions.

Pour ajouter des position "simple", pas de probleme.

Mais je souhaite ajouter des positon comme Top et Image.

Doubler cette mise en page (ce groupe Top Image)

Dans fichier php, je pense avoir le code en question.

Je pensais doubler ce code
creer des position image2 et Top2
Puis remplacer dans le code image par image2 etc...
Mais cela ne fonctionne pas

Code:
<?php if ((isset($item->positions['image'])) || (isset($item->positions['top']))) : ?> <!-- BOF image/top row --> <div class="flexi topblock group"> <!-- NOTE: image block is inside top block ... --> <?php if (isset($item->positions['image'])) : ?> <!-- BOF image block --> <?php foreach ($item->positions['image'] as $field) : ?> <div class="flexi image field_<?php echo $field->name; ?>"> <?php echo $field->display; ?> <div class="fcclear"></div> </div> <?php endforeach; ?> <!-- EOF image block --> <?php endif; ?> <?php if (isset($item->positions['top'])) : ?> <!-- BOF top block --> <?php $top_cols = $this->params->get('top_cols', 'two'); $span_class = ''; //$top_cols == 'one' ? 'span8' : 'span4'; // commented out: bootstrap spanNN is not responsive to width ! ?> <div class="flexi infoblock <?php echo $top_cols; ?>cols"> <ul class="flexi"> <?php foreach ($item->positions['top'] as $field) : ?> <li class="flexi lvbox <?php echo 'field_' . $field->name; ?>"> <div> <?php if ($field->label) : ?> <span class="flexi label field_<?php echo $field->name; ?>"><?php echo $field->label; ?></span> <?php endif; ?> <div class="flexi value field_<?php echo $field->name; ?>"><?php echo $field->display; ?></div> </div> </li> <?php endforeach; ?> </ul> </div> <!-- EOF top block --> <?php endif; ?> </div> <!-- EOF image/top row --> <?php endif; ?>

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

More
5 years 11 months ago #75434 by ggppdk
Replied by ggppdk on topic Top/image à doubler
Hello

did you replace 'image' 3 times
and 'top' also 3 times ?
Code:
<?php if ((isset($item->positions['image2'])) || (isset($item->positions['top2']))) : ?> <!-- BOF image2/top2 row --> <div class="flexi topblock group"> <!-- NOTE: image2 block is inside top2 block ... --> <?php if (isset($item->positions['image2'])) : ?> <!-- BOF image2 block --> <?php foreach ($item->positions['image2'] as $field) : ?> <div class="flexi image field_<?php echo $field->name; ?>"> <?php echo $field->display; ?> <div class="fcclear"></div> </div> <?php endforeach; ?> <!-- EOF image2 block --> <?php endif; ?> <?php if (isset($item->positions['top2'])) : ?> <!-- BOF top2 block --> <?php $top_cols = $this->params->get('top_cols', 'two'); $span_class = ''; //$top_cols == 'one' ? 'span8' : 'span4'; // commented out: bootstrap spanNN is not responsive to width ! ?> <div class="flexi infoblock <?php echo $top_cols; ?>cols"> <ul class="flexi"> <?php foreach ($item->positions['top2'] as $field) : ?> <li class="flexi lvbox <?php echo 'field_' . $field->name; ?>"> <div> <?php if ($field->label) : ?> <span class="flexi label field_<?php echo $field->name; ?>"><?php echo $field->label; ?></span> <?php endif; ?> <div class="flexi value field_<?php echo $field->name; ?>"><?php echo $field->display; ?></div> </div> </li> <?php endforeach; ?> </ul> </div> <!-- EOF top2 block --> <?php endif; ?> </div> <!-- EOF image2/top2 row --> <?php endif; ?>


-- 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
5 years 11 months ago #75438 by Teamherve
Replied by Teamherve on topic Top/image à doubler
its good. I tried that, but I made a mistake in the .xml file.

Now it's ok.
My goal was to get two Top columns.
But the left position is not identical to the one on the right.

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

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