• Resolved Aureline

    (@aureline)


    Hi,

    It’s me, again (sorry).

    I have 2 problems that I can’t solve.
    Here is the URL in question JSON: https://brewingtheory.hop3team.com/formations/la-maintenance-en-brasserie-et-micro-brasserie.json

    My problems :

    1 – I tried to format the date, but when I use this code as recommended in the documentation “:datetime,DATE_TIME_FORMAT” to put it in the day month year format, the date is no longer displayed.
    (I tested with and without the quotes).

    {upcoming_sessions.start_date:datetime,"m-d-Y"} au {upcoming_sessions.end_date}<br>

    2 – I tried to call a list present in the JSON, but it doesn’t work (I most certainly misunderstood how to do it) :

    {subloop-array:program:-1} 
    {module.name}<br>
    {module.description}
    {/subloop-array:program} 

    Otherwise, thanks to your valuable advice, I was able to call and correctly display the entire file (well, apart from these last 2 little problems).

    Thanks in advance !

    Best regards

    Auréline

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Aureline

    (@aureline)

    Hello @berkux,

    I hope this message finds you well. I’m concerned about not having heard back from you, as you’re typically quite responsive.

    Thank you in advance for your attention

    Best regards, Auréline

    Plugin Author berkux

    (@berkux)

    Hi @aureline,

    sent from a ship in the stormy north sea via starlink:

    Try this:

    [jsoncontentimporter url="https://brewingtheory.hop3team.com/formations/la-maintenance-en-brasserie-et-micro-brasserie.json" basenode="training"]
    {subloop-array:1:-1}
     {subloop-array:upcoming_sessions:-1}
                upcoming_sessions {upcoming_sessions.name} start at {upcoming_sessions.start_date:datetime,m-d-Y,0} <br>
        {/subloop-array:upcoming_sessions}
     {subloop-array:program:-1}
                program {program.name} with these moduels:
     {subloop-array:program.modules:-1}modules {program.modules.name} -{/subloop-array:program.modules}
        {/subloop-array:program}
        {subloop:training_category:-1}
                <span class="training_category">training category: {training_category.name}</span><br>
        {/subloop:training_category}
        {subloop:training_cycle:-1}
                <span class="training_cycle"><i aria-hidden="true" class="far fa-check-square"></i>cyle name: {training_cycle.name}</span><br>
        {/subloop:training_cycle}	
          {subloop:training_type:-1}
                <span class="training_type"><i aria-hidden="true" class="fas fa-users"></i>type name: {training_type.name}</span><br><br>
        {/subloop:training_type}	
      {/subloop-array:1}
      Objectifs de la formation et compétences visées :
    {goals:html}
    <br><br>
    {targeted_jobs:html}
    <br><br>
    {description:html}
    <br><br>
    Accessibilité Handicap :
    <br>
    {accessibility:html}
    <br><br>
    
    <a  target="_blank" rel="noopener">Je suis intéressé·e</a><br>
    </article> 
      [/jsoncontentimporter]

    Best wishes,
    Bernhard

    Thread Starter Aureline

    (@aureline)

    Seriously ?! Wow, I can’t believe it!

    Really, thank you for taking this time to answer my questions!

    It works perfectly ??

    A big thank you <3

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Problems with date format and list’ is closed to new replies.