Forum Replies Created

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter sactobla

    (@sactobla)

    Fantastic! Yes. That is it!

    Thank you!

    Thread Starter sactobla

    (@sactobla)

    So, I re-tested it just now and it does work…IF you paste the code into the “text” window of the page editor, not the WYSIWYG editor. Perhaps one solution is to allow the user to define the URL of the JSON on the plugin page and then call that URL in the short code using a user-defined word. (for example with two fields, one the URL and one the user’s name for that url). Of course you’d have to allow for multiple URLs.

    Thread Starter sactobla

    (@sactobla)

    Bernard:

    I tested it just now and I”m still getting the “unsupported” message. I used first the example you suggested. I also tried it just with the “title” and “Chamber” fields, without the sub loop argument. Both returned the same error. Plug-in page is showing that i’ve installed version 1.1.0.

    Thread Starter sactobla

    (@sactobla)

    Will do. Also plan to make a donation to support further development. Keep it up.

    Thread Starter sactobla

    (@sactobla)

    Excellent. That worked! Thank you.

    Thread Starter sactobla

    (@sactobla)

    Wow. Thanks for updating this to include this function. I can get the data to display when i use your example. However, when I try to display from a different data source, I can get objects to display fine but not the data within sub loop-array.
    The entire code is below. And when I do this the “committee” and “Id” fields display fine. However, after that it displays the actual code i.e. “subloop-array:members:5}?{name}
    {/subloop-array}” in the page. So the result looks like this:

    Standing Committee on Jobs, Economic Development, and the Economy ;CAC000329
    {subloop-array:members:5} {name}
    {/subloop-array}

    What am I doing wrong?

    [jsoncontentimporter url="https://openstates.org/api/v1//committees/CAC000329/?apikey=4680b1234b1b4c04a77cdff59c91cfe7"?numberofdisplayeditems="30" basenode=""]
    {committee} ;{id}
    
    {subloop-array:members:5}?{name}
    {/subloop-array}
    
    [/jsoncontentimporter]
    Thread Starter sactobla

    (@sactobla)

    Well (if you can’t tell ?? ) I’m a total novice. From a functional standpoint of how to craft a short code argument, that makes sense. The one issue/question I see is that, based on my research, it would need to somehow call each of the three objects in the array, so that it is displaying each of the records in the array separately. For example I have this code:

    {
    "object1": "data1",
     "another_object": "more data",
    "this_array_thing" : [
      { "date": "2009-02-25 00:00:00",
       "action": "Read first time. To print."},
      { "date": "2009-02-26 00:00:00",
       "action": "From printer. May be heard in committee March 28.",
        },
      { "date": "2009-03-23 00:00:00",
       "action": "Referred to Com. on HEALTH." },
    ]

    I would want the display to look like this:
    Data1 – More data:
    -2009-02-25 00:00:00, Read First Time, To Print
    -2009-02-26 00:00:00, From Printer. May be Heard in Committee
    -2009-03-23 00:00:00, Referred to Com on HEALTH

    Etc, with each record.

    Would your suggestion accomplish that?

Viewing 7 replies - 1 through 7 (of 7 total)