[ckan-dev] Custom facets: show some facets only if a certain value is selected for a =?utf-8?Q?=E2=80=9Cfather=E2=80=9D_?=facet
Giulia Benotto
benotto at netseven.it
Tue Jun 27 11:35:52 UTC 2017
More or less..
I’ll try being more clear, hoping I will succeed.
When I first load my page, I’d like to show just one facet instead of all of them. Then, once a certain item is chosen for that facet, I would like to show another facet, and for that facet I would like not to show all items, but just those that are related to the already made selection (aka the item selected for the first facet).
I managed to start doing this by modifying the file facet-list.html, and imposing a set of conditions.
Still, I would like to know if there is a better way to accomplish it (maybe javascript, but how can I make it interact with facets?) and if it is compliant with ckan behavior..
Thanks for your answer,
Giulia
On 27 giu 2017, 13:28 +0200, Tyler Kennedy <tk at tkte.ch>, wrote:
> Hello,
>
> I'm not entirely clear on what you're trying to accomplish. Are you just trying to implement a facet hierarchy?
>
> Thank you,
> Tyler Kennedy
>
> > On Jun 27, 2017 4:17 AM, "Giulia Benotto" <benotto at netseven.it> wrote:
> > > Hi CKAN developers,
> > > I don’t know if it may be useful but I managed to obtain the effect I wanted by modifying the facet-list.html file of my theme. Basically, I wrote a set of “if” conditions that evaluate both the item name and the item status. It’s not perfect and it’s a bit of a tedious process, but it’s the best I could do. If anyone has some other ideas on how to do this, for me it’s still a work-in-progress.
> > > Thanks,
> > > Giulia
> > >
> > >
> > >
> > > On 23 giu 2017, 15:21 +0200, Giulia Benotto <benotto at netseven.it>, wrote:
> > >
> > > > Hi CKAN developers,
> > > > I’m trying to develop a new ckan theme and I would like to modify how facets are shown. I have added my own set of metadata and I can now show all of them, while I don’t need to show CKAN default facets.
> > > > What I would like to do is the following: I have some facets that I need to show only if a particular value of a “father” facet is selected.
> > > > How can I do that? Has someone already developed something like this? Any ideas?
> > > > Thank you,
> > > > Giulia
> > > >
> > > > _______________________________________________
> > > > ckan-dev mailing list
> > > > ckan-dev at lists.okfn.org
> > > > https://lists.okfn.org/mailman/listinfo/ckan-dev
> > > > Unsubscribe: https://lists.okfn.org/mailman/options/ckan-dev
> > >
> > > _______________________________________________
> > > ckan-dev mailing list
> > > ckan-dev at lists.okfn.org
> > > https://lists.okfn.org/mailman/listinfo/ckan-dev
> > > Unsubscribe: https://lists.okfn.org/mailman/options/ckan-dev
> > >
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> https://lists.okfn.org/mailman/listinfo/ckan-dev
> Unsubscribe: https://lists.okfn.org/mailman/options/ckan-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20170627/75deac95/attachment-0003.html>
More information about the ckan-dev
mailing list