Jump to content

Repeater module does not repeat everything


Recommended Posts

Hi, I used the repeater module to repeat blocks of text with popup windows. Each block has 4 fields (title color, title, second title, subtitle, complex text with ckeditor). Thanks to the repeater module, I can also create 10 blocks all different in title, title color, subtitle, but NOT complex text field with ckeditor.
So I have 10 blocks all different in color and subtitle, but all the same with only 1 complex text ckeditor.
Where am I going wrong?

Here is the code I used:
 

		<div class="<?=$page->box_ampiezza?> uk-grid-collapse uk-text-center" uk-grid>	
		
			<?php foreach($page->box_ripetitore as $boxrip):?>	
			<!-- INIZIO BLOCCO RIPETUTO -->

			
			<div class="<?php echo $boxrip->box_ripetitore_colore?>">
				<div class="uk-tile" id="op31h2">
				
					<a href="#block01" uk-toggle>
						<h2 style="font-family: Anton; font-size: 3em; color: white;"><?php echo $boxrip->box_ripetitore_tit?></h2>
					</a>
					<div style="font-family: Oswald; color: gold; font-size: 1.5rem;"><?php echo $boxrip->box_ripetitore_sottotitolo?></div>
					
					<!-- SEZIONI FOGLIA -->					

						<div id="block01" class="uk-modal-container" uk-modal>
							
							<div class="uk-modal-dialog">
							<button class="uk-modal-close-default giralacroce" type="button" uk-close></button>
								
								
							<!-- IMMAGINE SINGOLA + BREVE COMMENTO APERTO -->																
								
								<div class="uk-modal-body">								
								
									<h2 class="uk-modal-title"><?php echo $boxrip->box_ripetitore_tit_h2?></h2>
									<p><?php echo $boxrip->box_ripetitore_articolo?></p>
												
								</div>
							
							<!-- END SEZIONI FOGLIA -->								
							
							
							</div>
						</div>

					
					<!-- END FOGLIA -->	

				</div>
			</div>
		
			
			<?php endforeach;?>					
			<!-- FINO BLOCCO RIPETUTO -->
			

		</div>
	
	<!-- END -->	

 

Link to comment
Share on other sites

Hi @franciccio-ITALIANO,

it seems, that you always have the same ID "block01" for all your modals, so only one modal will always be opened?

You should make the ID dynamic.

			<?php foreach($page->box_ripetitore as $b => $boxrip):?>
			<!-- INIZIO BLOCCO RIPETUTO -->


			<div class="<?php echo $boxrip->box_ripetitore_colore?>">
				<div class="uk-tile" id="op31h2">

					<a href="#block<?=$b?>" uk-toggle>
						<h2 style="font-family: Anton; font-size: 3em; color: white;"><?php echo $boxrip->box_ripetitore_tit?></h2>
					</a>
					<div style="font-family: Oswald; color: gold; font-size: 1.5rem;"><?php echo $boxrip->box_ripetitore_sottotitolo?></div>

					<!-- SEZIONI FOGLIA -->

						<div id="block<?=$b?>" class="uk-modal-container" uk-modal>

Regards, Andreas

  • Like 2
  • Thanks 1
Link to comment
Share on other sites

  • 3 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...