Trying to create a list view on the page, which has content like
1.Make
2 Model
3 Description
There are almost 150 such makes, and respective model and short description are added on the list view through pagination - of around 15 or 20 items
I am trying to count respective listing on the page and in between create a lead form view after 7th and 12th listing on every page
However - though all the listing are shown in the page - but the explode function is not executing - no such lead view showing after 7th and 12th listing
Here is the code tried through php explode function in which
<div class="pageing-box-right box-number">
<div class="pagination pageing-container"><ul>
<?php echo $this->pagination->getListFooter(); ?></ul>
<ul><?php //echo $this->pagination->getLimitBox(); ?></ul>
</div>
</div>
<?php foreach ($this->items as $i => $item) : ?>
<?php $canEdit = $user->authorise('core.edit', 'com_toys'); ?>
<?php if (isset($this->items[0]->state)) : ?>
<?php $class = ($canChange) ? 'active' : 'disabled'; ?>
<?php endif; ?>
<h3> <?php echo $this->escape($item->n_make); ?> <?php echo $item->n_model; ?> </h3>
<p> <?php echo $item->n_month; ?> <?php echo $item->n_year; ?> </p>
<p> <?php echo $item->n_short_description; ?> </p>
<hr/>
<?php endforeach; ?>
<?php
$listings = explode("<hr/>", $item->n_make);
$numberOfListings = count($listings);
$Reset =1;
for($i = 0; $i < $numberOfListings; ++$i)
{
if ($Reset == 7)
{ ?>
<div style="margin: 0 500px 5px 12px; float: left;">
<p> Test create form view 1 of lead </p>
</div>
<hr />
<p></p>
<?php } if ($Reset == 12) { ?>
<div style="margin: 0 500px 5px 12px; float: left;">
<p> Test Create Form View 2 of lead </p>
</br></hr>
</div>
<hr />
<p></p>
<?php }
echo $listings[$i] . "<hr/>";
if($Reset>15){
$Reset =1;
}
$Reset++;
}
?>
I believe the problem is in this line in the below code
$listings = explode("<hr/>", $item->n_make);
Can some one help on it
Here is the listing view - see the lead view which i wish to incorporate after 6/7th listing
Fisher Soft Toys
August 2016
Fisher toys are available at Bernado Store @ 10% Discount
-------------------------------------------
Trudi Soft Toys
August 2016
Trudi Peppy Bear now available. First Order will get first delivery
----------------------------------------------
Hamleys Princess Girl
August 2016
Hamleys Princess girl long awaited is now available online
-----------------------------------------------------------
Acctu
August 2016
Acctu Toys now available for sale in Japan
---------------------------------------------
Bernado Soft Toys
August 2016
Bernado toys are available at Bernado Store @ 10% Discount
-------------------------------------------
V Soft Toys
August 2016
V Bear now available. First Order will get first delivery
----------------------------------------------
**Lead View**
Send you Inquiry now by calling up 001 - 9999999999 or email on - [email protected]
------------------------------------------------
Jo Princess Girl
August 2016
Jo Princess girl long awaited is now available online
-----------------------------------------------------------
Acctu
August 2016
Acctu Toys now available for sale in Japan
$item->n_make. Does it contain '<hr/>'s?$item->n_makecontain, and ultimately what are you looking for?