Closed (won't fix)
Project:
Facet API
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
10 Oct 2011 at 12:20 UTC
Updated:
31 Oct 2014 at 00:12 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
ygerasimov commentedSee attached patch.
Comment #2
cpliakas commentedGreat feature request. I think the ideas are solid, I'll try to test sometime tonight.
Thanks for the contribution,
Chris
Comment #3
cpliakas commentedSo looking through the code, what steps would a themer have to take to add classes to an item?
Comment #4
ygerasimov commentedhm... yes, you are right, it is not quite possible for themer to add class for list item.
What I did was I created custom filter and there prepared facet links with needed array key (in execute() method). As don't have any possibility to "edit" each facet link, we cannot set these classes via interface.
But maybe themer should use some 'alter' hook to add classes that needed for any of the links.
Comment #5
cpliakas commentedWhat I am thinking is that it could be interesting to add textfields similar to Semantic Views / D7 Views that would allow for adding classes and wrapper markup via the UI. Might be an interesting non-code technique for themers to leverage. Would be curious to get your feedback on this.
Comment #6
ygerasimov commentedI think it is quite nice thing. But I don't think it is really needed as developers have quite good flexibility to create their own widgets. What I mean is that adding feature of adding classes from UI will introduce a lot of code that can be avoided with good documentation.
Of course if there will be many feature requests to do this implementation it is worth the time then.
Comment #7
cpliakas commentedThat's a good take, and thinking about this further you are probably right about giving good developers the flexibility to create widgets that do this. Let's continue to explore methods to make it easier to add classes to the list items like you original post.
Thanks for the feedback,
Chris
Comment #8
cpliakas commentedMarking this as "won;t resolve" due to the excellent documentation you wrote for developers to create their own widgets. Ideally I would like to have more flexibility over the theming in the default widgets, however in the spirit of getting 1.0 released I think the best approach for now is for people to create their own widgets to create more advanced displays.
Thanks for posting,
Chris
Comment #9
mikelaroy commentedJust assuming the documentation you're referring to is this.
Have you considered revisiting this? I'm thinking about a situation involving an existing E-commerce site using Facets where writing a custom widget may not be an option. For a themer coming into a project who is not able to create a custom widget like in the linked example, having a class on the list item would be a huge asset and save a ton of resources.