close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

"repeat selection improved" never repeats anything

Thread began 4/07/2021 1:17 pm by Jay Interapplabs Designer | Last modified 4/22/2021 5:27 pm by Ray Borduin | 48 views | 4 replies |

Jay Interapplabs Designer

"repeat selection improved" never repeats anything

repeat selection improved never repeats anything. Regardless of the page or recordset

Attached Files
cat.php
jaycms_categories.sql
Sign in to reply to this post

Ray BorduinWebAssist

You should use the standard MySQLi Repeat Region for most applications. The improved one allows more control and allows nesting inside of an existing repeat region, but it won't automatically update the number of rows returned by the recordset. The default is to only return one row.

You can manually update that by changing this line:
$Categories = new WA_MySQLi_RS("Categories",$jay_cms,1);

The 1 at the end is the number of rows in the recordset. You can change that to 0 for all rows, or change it to the number of rows you want returned to be used on the page.

Sign in to reply to this post
Did this help? Tips are appreciated...

Jay Interapplabs Designer

navigation creation Using databridge v2

I need to create a navagation drop down, I used to use css menu writer for this.
I have a table jaycms_categories I have attached it. I have a created the two record sets
first:
<?php
$Categories = new WA_MySQLi_RS("Categories",$jay_cms);
$Categories->setQuery("SELECT * FROM jaycms_categories WHERE CategoryParent = 0");
$Categories->execute();
?>
second:
<?php
$Subcategories = new WA_MySQLi_RS("Subcategories",$jay_cms,10);
$Subcategories->setQuery("SELECT * FROM jaycms_categories WHERE CategoryParent = ?");
$Subcategories->bindParam("i", "".($Categories->getColumnVal("CategoryID")) ."", "-1"); //colname
$Subcategories->execute();
?>
So ive attached the page ive wrapped the subcategories recordset in repeat selection improved
and categories and subcategories in repeat region.
I do get this result:

“<div class="mega-dropdown-column pt-4 px-2 px-lg-3">
<div class="widget widget-links"><a class="d-block overflow-hidden rounded-3 mb-3" href="#"><img src="img/shop/departments/02.jpg" alt="Shoes"></a>
<h6 class="fs-base mb-2">Bath and Shower</h6>
<ul class="widget-list">
<li class="widget-list-item mb-1"><a class="widget-list-link" href="#">soap</a></li>
<li class="widget-list-item mb-1"><a class="widget-list-link" href="#">Bath Bombs</a></li>
<li class="widget-list-item mb-1"><a class="widget-list-link" href="#">Shampoo Bars</a></li>
</ul>
</div>
</div>
<div class="mega-dropdown-column pt-4 px-2 px-lg-3">
<div class="widget widget-links"><a class="d-block overflow-hidden rounded-3 mb-3" href="#"><img src="img/shop/departments/02.jpg" alt="Shoes"></a>
<h6 class="fs-base mb-2">Hair</h6>
<ul class="widget-list">
</ul>
</div>
</div> “
So subcategories does not stay in the correct parent category.
Also i need the menu to really look like this:
****** Repeat this div wrap Every 3 record*** <div class="d-flex flex-wrap flex-sm-nowrap"> ****** Repeat this div wrap Every 3 record***

<div class="mega-dropdown-column pt-4 px-2 px-lg-3">
<div class="widget widget-links"><a class="d-block overflow-hidden rounded-3 mb-3" href="#"><img src="img/shop/departments/02.jpg" alt="Shoes"></a>
<h6 class="fs-base mb-2">parent category</h6>
<ul class="widget-list">
<li class="widget-list-item mb-1"><a class="widget-list-link" href="#">subcategory</a></li>
<li class="widget-list-item mb-1"><a class="widget-list-link" href="#">subcategory</a></li>
<li class="widget-list-item mb-1"><a class="widget-list-link" href="#">subcategory</a></li>
</ul>
</div>
</div>
<div class="mega-dropdown-column pt-4 px-2 px-lg-3">
<div class="widget widget-links"><a class="d-block overflow-hidden rounded-3 mb-3" href="#"><img src="img/shop/departments/02.jpg" alt="Shoes"></a>
<h6 class="fs-base mb-2">parent category</h6>
<ul class="widget-list">
<li class="widget-list-item mb-1"><a class="widget-list-link" href="#">subcategory</a></li>
<li class="widget-list-item mb-1"><a class="widget-list-link" href="#">subcategory</a></li>
<li class="widget-list-item mb-1"><a class="widget-list-link" href="#">subcategory</a></li>
</ul>
</div>
</div>
<div class="mega-dropdown-column pt-4 px-2 px-lg-3">
<div class="widget widget-links"><a class="d-block overflow-hidden rounded-3 mb-3" href="#"><img src="img/shop/departments/02.jpg" alt="Shoes"></a>
<h6 class="fs-base mb-2">parent category</h6>
<ul class="widget-list">
<li class="widget-list-item mb-1"><a class="widget-list-link" href="#">subcategory</a></li>
<li class="widget-list-item mb-1"><a class="widget-list-link" href="#">subcategory</a></li>
<li class="widget-list-item mb-1"><a class="widget-list-link" href="#">subcategory</a></li>
</ul>
</div>
</div>

****** Repeat this div wrap Every 3 record***</div> ****** Repeat this div wrap Every 3 record***

you can see the example here https://themes.getbootstrap.com/preview/?theme_id=35287
it is the department dropdown on the left.

Attached Files
categoryNav.zip
Sign in to reply to this post

Ray BorduinWebAssist

You probably just need to move the subcategories recordset from lines 9-13 inside of the repeat region after line 27.

That will cause the subcategories to be re-populated with each new category.

You should be able to use a standard repeat region for both of these as well. Since they are different recordsets, they should be able to be nested. The improved repeat region is only necessary for nested repeats of the same recordset, and if you want a fixed number of rows displayed regardless of the recordset results (or even without a recordset).

Sign in to reply to this post
Did this help? Tips are appreciated...

Jay Interapplabs Designer

Worked perfect thank you!

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...