We are transitioning over to a new forum platform. Please post new issues there. Existing threads will be dealt with here unless you choose to move them over. Visit the new forum

Forum

Thread tagged as: Question

List of client defined services

Hi,

I'm looking for suggestions on how to achieve the following please. I need a list of services that the client can select, indicating that service is available at a particular clinic.

I have two collections, clinics and services. On my clinic overview page, I wish to have a list of URLs linking to the collection service detail page. However, the services need to be client defined so they can change them if required.

I was thinking the clinic template could have a list of service checkboxes which the client could tick the relative service. However, I've run into issues outputting the URL as the client isn't going to know what that is. Then I tried page-list, before remembering this isn't a selectable page!

Suggestions would be very welcome! Thanks in advance

Grant Smith

Grant Smith 0 points

  • 8 months ago
Hussein Al Hammad

Hussein Al Hammad 105 points
Registered Developer

Hello Grant,

In your clinics Collection template, you can add a perch:related field to allow the editor to select the services:

<perch:related id="services" collection="services" label="Services"></perch:related>

On the clinic overview page you can list the services inside the template with something like this:

<perch:related id="services" collection="services" label="Services">
<perch:before><ul></perch:before>
<li>
<a href="/services/<perch:content id="slug">"><perch:content id="title"></a>
</li>
<perch:after></ul></perch:after>
</perch:related>

Spot on, I did forget about related!

Thanks very much. Grant