Context filter parameter settings

Created on 28 February 2025, about 1 month ago

Hello,

I did not see any relevant parameter settings in the context filter, How can I set these parameters? Thank you.

💬 Support request
Status

Active

Version

2.0

Component

Module

Created by

🇨🇳China hastroop

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @hastroop
  • 🇵🇱Poland sebaz

    What do you want to set? In what options are you interested in?

    Do you want to use arguments passed to the view as elements of fields? Something like tokens?

    I think your issue is a duplicate of: Support tokens in Key Chooser of JSON Field of (Fields, Filter criteria, Contextual filters) Support tokens in Key Chooser of JSON Field of (Fields, Filter criteria, Contextual filters) Active

  • 🇨🇳China hastroop

    I don't think these two issues are duplicate feature requests.

    My issue mainly focuses about the Configure contextual filter options, such as the frequently used Provide default value, I can't find any options there, it seems like it's missing.

    You can try this module views_csv-source to see the Configure contextual filter: CSV: CSV Field.

    The following filters are used to receive year parameters. ( http://www.xxxx.com/xxxx?year=2025 )
    Note that this is a CSV view, not JSON, Because the JSON view does not have these configuration options.

    The contextual filter configuration options itself is a feature of the view's contextual filter, However, in the JSON module, it was deleted.

    @msn5158 issue:
    His main problem is to dynamically choose a key (as the key for extracting JSON data) in Key Chooser based on the current context data or URLs. That is to say, the key is dynamically determined, not a fixed key in the Key Chooser.

  • 🇨🇳China hastroop

    He mainly refers to using different keys in the same json API to extract corresponding values.
    My issue refers to filtering for extracted json data. It is a fundamental function of contextual filters.

  • 🇵🇱Poland sebaz

    It looks like Views CSV Source module works differently.

    JSON is not SQL, so you can not filter received data. Especially when you need to set parameters to external API which is linked in this view. It is impossible to give parameters when API can accept GET or POST method, it can be done by &var=XX&bar=yy or /xx/yy or other thing.

    That means Views Json Source module needs parametrisation options with native or Token module tokens. Views CSV Source is doing it in other way and can manipulate with contextual filters. JSOn Source is not, yet.

Production build 0.71.5 2024