Postings

You can freely browse the forum and post in the community forum.
However, you need a valid license to write posts for support (own a valid commercial software license or have purchased a support membership).

Posts only show once reviewed. This is mainly preventive to keep spam away. Thank you for your understanding!

Filter option

  • waro
  • waro's Avatar Topic Author
  • New Member
  • New Member
More
IP: 77.65.53.162 3 years 3 weeks ago #6007 by waro
Filter option was created by waro
Hello
I am trying to make a new dog shelter website. On the most important subpage i would like to have article filter option like (Dog or Cat) AND (small OR medium OR big) AND (male OR female)

Is it possible or this would need some heavy coding work ?
  • syw
  • syw's Avatar
  • Administrator
  • Administrator
More
IP: 75.214.8.171 3 years 3 weeks ago - 3 years 3 weeks ago #6008 by syw
Replied by syw on topic Filter option
Hello,

well, what I would do is create custom fields of type 'list' :
- one for the kind of animal,
- one for the size,
- one for the gender.
The information is modified at the article level.

Then you can use those fields as index. These indexes can be created in the 'pagination' tab of a Latest News Enhanced menu item. Create 3 indexes, one for each custom field. People will then be able to select what they are looking for.

Olivier.
Last edit: 3 years 3 weeks ago by syw.
  • waro
  • waro's Avatar Topic Author
  • New Member
  • New Member
More
IP: 95.108.48.39 3 years 2 weeks ago #6013 by waro
Replied by waro on topic Filter option
Thank you, it work good. Is it possible to use images/icons next to text? Like image of dog next to dog and cat next to cat in these filter ?
  • syw
  • syw's Avatar
  • Administrator
  • Administrator
More
IP: 2600:1017:a410:5a9:fc:cfea:7a0e:e8b8 3 years 2 weeks ago #6014 by syw
Replied by syw on topic Filter option
Great!

These are standard HTML select fields therefore you cannot add extra attributes to add a class to options for instance.

However, if you were to use the flat list and not the select box for animals, you probably could add icons to the lneplistfield pagination layout (you need to create an override), test for values and if the value is cat, for instance, add the classes 'fas fa-cat' next to the name.

Note that this layout is used for all custom fields of type list used as index, so you'll have to be careful.

If you need help figuring it out, you'll have to send an email to [email protected] and give me credentials so that I can access template overrides.

Olivier.
  • waro
  • waro's Avatar Topic Author
  • New Member
  • New Member
More
IP: 77.65.53.162 3 years 2 weeks ago #6015 by waro
Replied by waro on topic Filter option
Thank you, i send you link to my test site on your email. Please look what i have created :)
The following user(s) said Thank You: syw
  • waro
  • waro's Avatar Topic Author
  • New Member
  • New Member
More
IP: 77.65.53.162 2 years 4 months ago #6089 by waro
Replied by waro on topic Filter option
Hello,
Filter option works great and i would like to know if it is possible to upgrade it to have multi selection in fileds gender and size ? That we could select for exaple small, medium and female and male