Jump to content

How would you approach this?


Recommended Posts

Happy new year, everyone!

I'm working on a BnB website and I need to have an anemities list like this:

image.png.4108273ace7ef700249dc5dbf9884156.png


How would you approach something like this in the admin? I need to create a global list of amenities, with sections, each with a title, icon and optional note, that in each unit I can just select with checkboxes.

The most viable option is probably to create separate pages for each + a multi-page select field. But there are a couple of things I don't quite like in that approach. One is creating / managing the options. Having to create these as pages one by one makes my skin crawl, and I'd much rather have someting like a repeater on a global config section of the homepage. The other is selecting them. I've created amenities/section/amenty templates, the pages select field looks for the amenity template, and in the end the sections aren't accounted for when I'm selecting in the unit page. I'll probably have to grind a bit to get them to display organised by section in the end, now that I think about that.

Any better ideas?

Link to comment
Share on other sites

7 hours ago, heldercervantes said:

Having to create these as pages one by one makes my skin crawl, and I'd much rather have someting like a repeater on a global config section of the homepage.

Why is creating pages any worse than populating a repeater? I'd prefer pages I guess.

7 hours ago, heldercervantes said:

The other is selecting them. I've created amenities/section/amenty templates, the pages select field looks for the amenity template, and in the end the sections aren't accounted for when I'm selecting in the unit page.

I don't understand the last part. Could you please explain what you mean exactly?

----

I'd go with pages and build a custom Inputfield for selecting icons. It's really not that hard and definitely the best UX 🙂 Once you have answered the above questions I might be able to help 😉 

Link to comment
Share on other sites

46 minutes ago, bernhard said:

Why is creating pages any worse than populating a repeater? I'd prefer pages I guess.

Which, in turn, is creating pages too, albeit invisible to the user!

I am with Bernhard on this: use pages and use them as tags. I love reusability.

Also, considering you having multiple BnB locations, won't a repeater approach just make the user enter the same items again and again (the exact reason to go with tags instead of repeaters)?

Another reason for tags: this ensures consistency and avoids typing mistakes, items which mean the same but are a bit different, AND most importantly: you can easily filter by amenity using the API.

Link to comment
Share on other sites

Another vote for a page multiselect, with a label format of "{parent.title}: {title}" and a sort of "parent.title, title" to make things easy to see in the backend. As for grouping by sections, this might perhaps help you:

 

  • Like 2
Link to comment
Share on other sites

1 hour ago, bernhard said:

Why is creating pages any worse than populating a repeater? I'd prefer pages I guess.

Page loads on every step. Adding to a repeater is a lot quicker and less frustrating than creating a page. I usually add a "Global settings" tab to the homepage where I put a repeater for the social networks, email for form submissions and stuff like that, so I was wondering if I could have a field there to manage this list instead of pages. It would also seem more tidy and even intuitive for the admin than using pages on the tree. The idea that pages on the tree might not be actual pages but also the options for a field is super weird to me.

 

1 hour ago, bernhard said:

I don't understand the last part. Could you please explain what you mean exactly?

image.png.33bef39a5bb8606519d4789df1bf51db.png

This is what I mean. The amenities are grouped in sections, but those are lost when selecting them on the page. Not an issue with the 9 or 10 that I have now, but considering in the end there will be 50 of them, it won't be very user-friendly. Oh, as I was writing this, @BitPoet pointed out the solution. Thanks man, great timing 😄
 

Link to comment
Share on other sites

11 hours ago, poljpocket said:

I am with Bernhard on this: use pages and use them as tags. I love reusability.

Tags are an option too @heldercervantes - use Text Tags inputfield with Page Reference field type and select "allow new pages to be created from field", but I haven't used that with a 'section' hierarchy such as that suggested by @BitPoet.

EDIT: BTW, the CustomDependSelects module was specifically designed to operate inside repeaters. Whether you use that or the grouping method is a question of how many pages there are and your personal preference.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...