• Resolved stuart0870

    (@stuart0870)


    Hello Bernhard, I am trying to replicate the page contained here on our own website (with this json data), but I’m struggling to build the table with column of data, rather than rows of data, if I put the {/subloop-array:points} at the end of the table, it just duplicate row labels, if I try to use multiple subloops of the same array on separate rows, it deletes the lines from the table altogether.

    I’ve also noticed that for each subloop it generates 3 <p> before the displayed items too.

    Following on from this I’ve already referenced subloop-array:innnigs to generate the runs-wickets (overs) values, but I need to refer back to innings later on in the page, I can’t put the /subloop just before /jsoncontentimporter, so how can I do this please?

    I’m going to assume the math of adding two json values together in get a total isn’t going to be in the free version?

    Thanks in advance.
    -Stuart.

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter stuart0870

    (@stuart0870)

    If it helps to see the code I’m currently butchering, it’s here.

    Plugin Author berkux

    (@berkux)

    Hi stuart0870,

    <<I’ve also noticed that for each subloop it generates 3 <p> before the displayed items too.>>
    Those werde added by wordpress: remove the linefeeds from the template. The pro version can switch this off.

    <<I’m going to assume the math of adding two json values together in get a total isn’t going to be in the free version?>>
    correct

    Bernhard

    Plugin Author berkux

    (@berkux)

    try

    [jsoncontentimporter url=https://www.sspcc.co.uk/wp-content/uploads/json/example.json basenode="match_details"]
    league_name: {league_name}
    {subloop-array:players:-1}
    {subloop-array:players.home_team:-1}{players.home_team.player_name}, {/subloop-array:players.home_team}<br>
    {subloop-array:players.away_team:-1}{players.away_team.player_name}, {/subloop-array:players.away_team}
    {/subloop-array:players}
    [/jsoncontentimporter]

    Bernhard

    Thread Starter stuart0870

    (@stuart0870)

    Thank you, I’ll give that a try.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Building a table of vertical data, rather than horizontal’ is closed to new replies.