PDA

View Full Version : Multiple viewing options


toby379423
05-22-2009, 11:16 AM
I was wondering if there was a way to set up multiple viewing options in PowerStore to enable customers to view more that just 5 items on a page.

Ideally what I would like to offer is a way to view not just 5 items per page but maybe let the viewer have options to choose either 5, 25, 50 or even more items per page. Is this possible to set up in PowerStore?

Ray Borduin
05-22-2009, 11:44 AM
It uses the standard dreamweaver recordset and recordset interactions. This is a setting in the dreamweaver repeat region server behavior that can be updated through the existing DW user interface.

Giving user options of the number of rows from a form is not directly supported, but should be very easy to do if you have a rudimentary knowledge of forms and php. It should just be a matter of updating a variable to come from a session and then creating a form to update that session with the number of rows.

toby379423
05-22-2009, 12:02 PM
Great! I'm still pretty much a newbie when it comes to php, are there any resources you could possibly point me to that can show me how to do this?

Ray Borduin
05-22-2009, 12:12 PM
Any resource on Forms and PHP.

You can read about: $_POST in any php resource. If you own Ecart you can probably just try it and be successful. Just think about what you want to do and do it.

1) Add a list to the page to show the options of the number of rows to display
2) Set a session variable with a default value of the number of rows you want to display by default. (you can use the server behavior that comes with eCart for setting session variables default value when they aren't set as the trigger)
3) Update the session variable from the form post (again use the eCart server behavior in the general category to set the session variable from the form element, using the form element as the trigger)
4) Set the dynamic attribute of the list so that it selects the current value of the session variable as the number of rows so that it will be accurate
5) Find the reference to the number of rows in the code... maybe update the number of rows in the server behavior to "1234" so that it will be easy to find in the code. Wherever it is referenced, replace it with a reference to the session variable that we created and tied to the list in steps 1-4 above

toby379423
06-13-2009, 09:41 PM
And where exactly would I start with that? Is there a certain page that I would find that?

Ray Borduin
06-15-2009, 07:06 AM
You won't find anything.... It is something you will be creating.

You would start on the page where you want to add the functionality you want to add.

Then start with step 1 above:

1) Add a form with a select list to the page where someone can choose how many records they want to display.