Spacing on Page

4 posts by 3 authors in: Forums > CMS Builder
Last Post: April 4, 2011   (RSS)

Re: [maja13] Spacing on Page

By robin - April 4, 2011

Hey,

Many
<br/><hr/>
are appearing, and that's what is causing the long space. It seems to be caused by this block of code:
<?php foreach ($conference_registrationRecords as $record): ?>
<?php echo $record['content'] ?><br/><hr/>
<?php endforeach ?>

Is there possibly many records in your conference_registration section that have no content? You could try adding:
'limit' => '1',
to your load records code.

Otherwise you could just remove the
<br/><hr/>
if that's easier.

Hope that helps,
Robin
Robin
Programmer
interactivetools.com

Re: [maja13] Spacing on Page

By Jason - April 4, 2011

Hi,

From what I can see on your page, this is the part of the code that's the problem:

<?php foreach ($conference_registrationRecords as $record): ?>
<?php echo $record['content'] ?><br/>
<hr/>
<?php endforeach ?>


This is outputting the content of every record from $conference_registrationsRecords. If you look at the page source on that page, you'll notice a large number of <hr/><br/> tags, which is what it causing this space.

It looks like you probably only want to output a single record here, not all of them.

Hope this helps.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Jason] Spacing on Page

By maja13 - April 4, 2011

That fixed it! Thank you Robin and Jason. Knew some part of the code was causing every record to load but wasn't sure what.