DataSrc:DemoJan25/StrapiEvents: Difference between revisions

    From UNITApedia
    No edit summary
    Tag: Reverted
    No edit summary
     
    (32 intermediate revisions by the same user not shown)
    Line 1: Line 1:
    {{#get_web_data:url = https://unitapedia.univ-unita.eu/strapi/api/events
    == Strapi Events Display ==
       |format = json
     
       |headers = Authorization: Bearer STRAPI_TOKEN
    <!-- 1) Fetch the data with #get_web_data -->
       |data = eventId = data.*.id
    {{#get_web_data:
       |debug = 1
      |url     = https://unitapedia.univ-unita.eu/strapi/api/events?populate=events,SupplementaryInfo
       |format = json
       |data    =
        EventID      = id,
        CreatedAt    = createdAt,
        UpdatedAt    = updatedAt,
        PublishedAt  = publishedAt,
        EventType    = Type,
        Participants  = Participants,
        Certificate  = Certificate,
        Category      = Category,
        EventDate    = Date,
        Publication   = Publication,
        Seminars      = Seminars,
        Workshops    = Workshops
       |debug   = 1
    }}
    }}
    <!-- 2) Display the data -->
    {{#if:{{#external_value:EventID}} |
      === Event Details ===
      * **Event ID:** {{#external_value:EventID}}
      * **Created At:** {{#external_value:CreatedAt}}
      * **Updated At:** {{#external_value:UpdatedAt}}
      * **Published At:** {{#external_value:PublishedAt}}
      * **Type:** {{#external_value:EventType}}
      * **Participants:** {{#external_value:Participants}}
      * **Certificate:** {{#external_value:Certificate}}
      * **Category:** {{#external_value:Category}}
      * **Date:** {{#external_value:EventDate}}
      * **Publication:** {{#external_value:Publication}}
      * **Seminars:** {{#external_value:Seminars}}
      * **Workshops:** {{#external_value:Workshops}}
    |
      * **Error:** Unable to retrieve event data. Check the debug output below.
    }}
    == Debug Output ==
    {{#external_data_debug}}

    Latest revision as of 11:29, 28 January 2025

    Strapi Events Display[edit source]

    Event Details

     * **Event ID:** Error: no local variable "EventID" has been set.
     * **Created At:** Error: no local variable "CreatedAt" has been set.
     * **Updated At:** Error: no local variable "UpdatedAt" has been set.
     * **Published At:** Error: no local variable "PublishedAt" has been set.
    
     * **Type:** Error: no local variable "EventType" has been set.
     * **Participants:** Error: no local variable "Participants" has been set.
     * **Certificate:** Error: no local variable "Certificate" has been set.
     * **Category:** Error: no local variable "Category" has been set.
     * **Date:** Error: no local variable "EventDate" has been set.
    
     * **Publication:** Error: no local variable "Publication" has been set.
     * **Seminars:** Error: no local variable "Seminars" has been set.
     * **Workshops:** Error: no local variable "Workshops" has been set.
    

    Debug Output[edit source]

    {{#external_data_debug}}