Forum

Thread tagged as: Question

displaying a listing of products and the detail of the first product

Hi

Is it possible with a list and detail page, to list the products names as well as the first product detail, then when each product name is mouse click it replaces the first product detail

Regards,

Brett

Brett Warne

Brett Warne 0 points

  • 7 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Yes. Where it does this on the page:

if (perch_get('s')) {

 // Detail mode

} else {

 // List mode

}

it sounds like you basically want to do:

if (perch_get('s')) {

 // Detail item
 // List 

} else {

 // Detail of first item
 // List

}

Hi Drew

Yes thanks

product listing here

//detail mode here

if get s go to the slug

else match a product name with the value of the product

Perch is so easy sometimes you look for much harder answers

cheers,

Brett