[ckan-dev] Custom facets: show some facets only if a certain value is selected for a “father” facet

Steven De Costa steven.decosta at linkdigital.com.au
Thu Jun 29 12:36:56 UTC 2017


I think this sounds more like a hierarchy for the first two steps. If you
attempt to accomplish it via facets wouldn't you end up relying on the
metadata values to ensure the functionality you desire?  I think this would
mean you'd need additional validation of metadata entries based on
hierarchy logic anyway...

Perhaps try to visualize this with a Venn diagram... I think you'd end up
with discrete sets within sets, then these are the actual Facets which
allow for discovery through intersects.

Apologies if I've missed something and my comment simply adds confusion ;)

Cheers,
Steven



On Tue, Jun 27, 2017 at 9:37 PM Giulia Benotto <benotto at netseven.it> wrote:

> 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
>
> _______________________________________________
> 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
>
-- 
*STEVEN DE COSTA *|
*EXECUTIVE DIRECTOR*www.linkdigital.com.au
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20170629/98d607eb/attachment-0003.html>


More information about the ckan-dev mailing list