Can a dynamic page have a dynamic repeater inside of it?

I am making a dynamic page for 4 sponsor packages. See below:

The top title and buttons are an unchanging header, but I would like ‘Package Title’, that strip, and the ‘Feature’ repeater below it to be dynamically populated depending on which Package button is clicked.

How can I do this?

Hi nick,

Do you want to one repeater refer to one DB’s data ?

I guess you are using one database for all package data.

Hi Heson,

Yes the repeater would connect to a database, and the repeater would be populated with Feature data depending on whether it’s the Platinum Package page or Gold Package, page, etc.

Thoughts?

Thank you for your response!

Hi nick,
If there is only a single DB, I think you can create a sorting / filtering more than using different repeater to show feature data.

For sorting / Filtering,
Keep in mind, you need to have a property as a sorting property. Therefore, you can get different sorting results.

Manage dataset with sorting what results you want to let your site visitor see when the page on load.

Coding inspire,
import wixData from ‘wix-data’;

//…

export function package1_click( ) {
$w(“#packageTitle”).text = “TitleYouNeed”;
$w(“#packageDataset”).setSort(wixData.sort( ) .descending(“dataCreatedDate”)
.eq(“package”, package1).eq(“feature”, true) );
}

Remarks,
I guess you may have lots of data for each package and you only want to display some feature items. Therefore, I guess you may have a property call “feature”, which type is boolean with true or false.

For more inspire,
Manage dataset number of item to display with lower numbers. Using anchor or other elements you want as a trigger to do a loadMore( ) action. For example,
//…

export function anchor_viewportEnter ( ) {
$w(“#packageDataset”).loadMore( );
}

Remarks,
If you want to use dataset loadMore ( ) action, it is better to use dataset.setSort more than wixData.query. It’s because sorting of wixData.query cannot pass to loadMore( ) action.

Code above is some use cases in my WiX project, enjoy and feel free communicate with me :slight_smile:

Hope useful. Good luck,
Heson

Thank you so much!! This is a great help and you put a lot of work into this, I really appreciate it.