1

I use the same icons across most of my projects, and typically just list them in Dropdown fields. However, this quickly becomes difficult to manage, so I'm looking to create a simple plugin that I can easily reuse.

I've started with pluginfactory.io to scaffold it out, selecting the Field Types component and installed via Composer but struggling from there.

  • How do I define the list of icons that should show in the dropdown field?
  • How do I get that to then reference the correct SVG file?
  • How do I output that properly in my templates with {{ entry.icon }}?

I realise that's literally asking how to build this thing 🙄 but I would appreciate some guidance!

1 Answer 1

1

What you are describing sounds a lot like the Position Fieldtype. I would look at that plugin for guidance.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.