Hello everyone,
I’m working on a website for a museum in which the museum can upload events.
each event has a different location inside the museum, and the list of the locations is endless - therefore we want it to work like tags. every time they create a new ‘location’ it can be picked again in a different event.
So far it’s easy. The problem is that for each location they need to connect an icon of arrow from a list of arrows. The arrow should be part of the ‘location tag’ since it’s not going to change in the future.
Do you have any idea How should I approach this tag component that I try to achieve?
and another question is how can I create a list of custom icons inside the panel?
Thanks!
I managed to make a selection field that shows the location pages. This helped me eventually.
The problem is that I can’t display in the page the name of the location - It only displays the path of it the site, for example: ‘home/salon’.
BTW in the panel it shows in the selection the names of the locations.
this is my location yml:
title: Location
sections:
location:
type: fields
fields:
name:
label: name of location
type: text
If the field is empty or the location was deleted, $event->location()->toPage() will return null, and you cannot call an object method (name() in this case) on null.