Announcement

Collapse
No announcement yet.

Pass QueryString arguments to liquid plugin_function

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Pass QueryString arguments to liquid plugin_function

    Is there is a way to pass the querystring arguments to the plugin_function liquid tag?​

    Is something like the following possible?
    plugin_function 'MyPlugin' 'GetDevicesHtml' ['<querystring arguments would be placed here>]

    The reason is I'm trying to maintain html code in the plugin and the state through the querystrings to various page links and maintain the floor or room parameters.

    #2
    Not tried this but you may be able to pass them as an array:

    {{ myarray = [] }}
    {{myarray[0] = queries['room']}}
    {{myarray[1] = queries['floor']}}
    {{plugin_function 'MyPlugin' 'GetDevicesHtml' myarray}}
    Jon

    Comment


      #3
      Yes, you can do it as Jon says, and you don't need the multiple lines:

      {{plugin_function 'MyPlugin' 'Test' [queries['room'],queries['floor']]}}

      Make sure your function has the right signature as well:

      Public Function Test(room As String, floor As String) As String

      Comment

      Working...
      X