web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Pages / Image carousel not wor...
Power Pages
Unanswered

Image carousel not working

(0) ShareShare
ReportReport
Posted on by 2

Hello everyone,

 

I contact the community because I have an issue when I want to add a images carousel on my webite create with Power Pages. Sorry if it not the right place.

 

I followed this tutorial https://learn.microsoft.com/en-us/power-pages/configure/web-templates-as-components-carousel

 

And other tutorial and the result is the same: 

- All items are displayed

- No buttons are shown.

 

Someone can help me please ?

 

Code page HTML: 

<div class="container">{% include 'DemoYTCarousel' title:"DemoCarousel" interval:"6500" count:"2" height:"200" %}</div>
 
Code web template:
{% fetchxml locationsQuery %}
    <fetch mapping='logical'>
    <entity name='cre10_demoytcarousel'>
        <attribute name='cre10_name' />
        <attribute name='cre10_description' />
        <attribute name='cre10_carousel_url' />
    </entity>
</fetch>
{% endfetchxml %}

<h2>{{ title | default: "Locations" }}</h2>
{% assign interval = interval | integer %}
{% assign count = count | integer %}
{% assign height = height | integer %}
<span>Showing {{ count }} out of {{ locationsQuery.results.entities.size }}</span>

{% if locationsQuery.results.entities.size > 0 %}
    <div id="carousel-example-generic"
    class="carousel slide"
    data-ride="carousel"
    data-interval="{{interval}}">
    <!-- Indicators -->
    <ol class="carousel-indicators">
        {% for location in locationsQuery.results.entities limit: count %}
        <li
            data-target="#carousel-example-generic"
            data-slide-to="{{forloop.index0}}"
            class="{% if forloop.first %}active{% endif %}"></li>
        {% endfor %}
    </ol>

    <!-- Wrapper for slides -->
    <div class="carousel-inner" role="listbox">
        {% for loc in locationsQuery.results.entities limit: count %}
        <div class="item {% if forloop.first %}active{% endif %}" style="background-image:url('{{loc.cre10_carousel_url}}&Full=true'); height: {{height | default:500}}px">
            <div class="carousel-caption" style="background:white">
            <h3>{{ loc.cre10_name }}</h3>
            <p>{{ loc.cre10_description }}</p>
            </div>
        </div>
        {% endfor %}
    </div>

    <!-- Controls -->
    <a
        class="left carousel-control"
        href="#carousel-example-generic"
        role="button"
        data-slide="prev">
        <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
        <span class="sr-only">Previous</span>
    </a>
    <a
        class="right carousel-control"
        href="#carousel-example-generic"
        role="button"
        data-slide="next">
        <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
        <span class="sr-only">Next</span>
    </a>
    </div>
{% endif %}

<style>
    .carousel .item {
    background-size: cover;
    background-repeat: no-repeat;
    }
</style>

{% manifest %}
    {
    "type": "Functional",
        "displayName": "Locations Slider",
        "description": "Locations slider using the table 'Place' as the data source",
        "tables": ["cre10_demoytcarousel"],
        "params": [
            {
            "id": "title",
            "displayName": "Title",
            "description": ""
        },{
            "id": "interval",
            "displayName": "Interval",
            "description": "The amount of time to delay between automatically cycling an item. If false, carousel will not automatically cycle. Default: 5000ms"
        },{
            "id": "count",
            "displayName": "Count",
            "description": "The number of locations to display"
        },{
            "id": "height",
            "displayName": "Slide's height",
            "description": "In px, default: 500px"
        }
      ]
    }
{% endmanifest %}

 

Power_pages_view_on_preview.PNG
Power_pages_view.PNG
Categories:
I have the same question (0)
  • Fubar Profile Picture
    8,505 Super User 2026 Season 1 on at

    Suspect the glyphicon class is not correct (or present), try replacing the entries in the class= for next and prev to see if you get something

    class="glyphicon fa-solid fa-magnifying-glass"

  • mfregier Profile Picture
    2 on at

    Hello,

    thanks for your help and your feedback.

    I tried to change the glyphicon class and now there are two "magnifying-glass" that appear (see picture).

     

    However, regarding the picture, I already have the two pictures show in the same time.

    Do you know what is the reason?

     

    Moreover, I follow this tutorial https://www.youtube.com/watch?v=y8DcDlZIzOg and when he added the include of the web template in the HTML code, he had a liquid error (due to permission). I do not have this error. Furthermore, after when he set the permission, a gray front with arrows appeared. So, is it possible that the liquid framework is not activated in my environment ?

     

    Thanks.

    dd.PNG
  • Harikiran_K Profile Picture
    on at

    I am also facing the same error where images are displaying and the text seems to be greyed out. I referred the same video that you have mentioned. Could you please let me know how were you able to resolve the issue.

    Harikiran_K_0-1721118113840.png

    The code that I have used for web-template is as below:

    {% fetchxml locationsQuery %}
        <fetch mapping='logical'>
        <entity name='cr109_demoprcarousel'>
            <attribute name='cr109_name' />
            <attribute name='cr109_description' />
            <attribute name='cr109_carouseluimage_url' />
        </entity>
        </fetch>
    {% endfetchxml %}

    <h2>{{ title | default: "Locations" }}</h2>

    {% assign interval = interval | integer %}
    {% assign count = count | integer %}
    {% assign height = height | integer %}

    <span>Showing {{ count }} out of {{ locationsQuery.results.entities.size }}</span>
    {% if locationsQuery.results.entities.size > 0 %}
        <div id="carousel-example-generic"
        class="carousel slide"
        data-ride="carousel"
        data-interval="{{interval}}">
        <!-- Indicators -->
        <ol class="carousel-indicators">
            {% for location in locationsQuery.results.entities limit: count %}
            <li
                data-target="#carousel-example-generic"
                data-slide-to="{{forloop.index0}}"
                class="{% if forloop.first %}active{% endif %}"></li>
            {% endfor %}
        </ol>
        <!-- Wrapper for slides -->
        <div class="carousel-inner" role="listbox">
            {% for loc in locationsQuery.results.entities limit: count %}
            <div class="item {% if forloop.first %}active{% endif %}" style="background-image:url('{{loc.cr109_carouseluimage_url}}&Full=true'); height: {{height | default:500}}px">
                <div class="carousel-caption" style="background:white">
                <h3>{{ loc.cr109_name }}</h3>
                <p>{{ loc.cr109_description }}</p>
                </div>
            </div>
            {% endfor %}
        </div>
        <!-- Controls -->
        <a
            class="left carousel-control"
            href="#carousel-example-generic"
            role="button"
            data-slide="prev">
            <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
            <span class="sr-only">Previous</span>
        </a>
        <a
            class="right carousel-control"
            href="#carousel-example-generic"
            role="button"
            data-slide="next">
            <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
            <span class="sr-only">Next</span>
        </a>
        </div>
    {% endif %}

    <style>
        .carousel .item {
        background-size: cover;
        background-repeat: no-repeat;
        }
    </style>

    {% manifest %}
        {
        "type": "Functional",
            "displayName": "Locations Slider",
            "description": "Locations slider using the table 'Place' as the data source",
            "tables": ["cr109_demoprcarousel"],
            "params": [
                {
                "id": "title",
                "displayName": "Title",
                "description": ""
            },{
                "id": "interval",
                "displayName": "Interval",
                "description": "The amount of time to delay between automatically cycling an item. If false, carousel will not automatically cycle. Default: 5000ms"
            },{
                "id": "count",
                "displayName": "Count",
                "description": "The number of locations to display"
            },{
                "id": "height",
                "displayName": "Slide's height",
                "description": "In px, default: 500px"
            }
          ]
        }
    {% endmanifest %}
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Pages

#1
11manish Profile Picture

11manish 50

#2
Valantis Profile Picture

Valantis 26

#3
omkarsupreme Profile Picture

omkarsupreme 24

Last 30 days Overall leaderboard