08-07-2023 02:26 AM
In the steps below, we create a web template component that displays a slideshow of images enabling Citizen developers to be able to configure the speed and indicator visibility of the slideshow in the power pages designer studio.
Create a web template.
In the Portal management (or power pages portal management if using enhanced data model) app , in the Content section, choose Web Templates and select New from the main menu to create a new web template.
Enter imageslider for the Name and save.
Setup the template with manifest.
In the Power Pages Design studio, Select Edit Code which opens VS code for the web
<div id="myCarousel" data-ride="carousel" class="carousel slide" data-interval={{interval}}>
<!-- Indicators -->
{% if {{indicator}} == 'Yes' %}
<ol class="carousel-indicators">
<li data-target="#myCarousel" data-slide-to="0" class="active"></li>
<li data-target="#myCarousel" data-slide-to="1"></li>
<li data-target="#myCarousel" data-slide-to="2"></li>
</ol>
{% endif %}
<!--slides -->
<div class="carousel-inner">
<div class="item active">
<img src="/Geometric-4.png" alt="" name="Geometric-4.png"
style="width: 117%; height: 305.545px; max-width: 100%;">
</div>
<div class="item">
<img src="/Geometric-2.png" alt="" name="Geometric-4.png"
style="width: 117%; height: 305.545px; max-width: 100%;">
</div>
<div class="item">
<img src="/Graph-1.png" alt="" name="Geometric-4.png"
style="width: 117%; height: 305.545px; max-width: 100%;">
</div>
</div>
<!-- Left and right controls -->
<a href="#myCarousel" data-slide="prev" class="left carousel-control">
<span class="glyphicon glyphicon-chevron-left"></span><span class="sr-only">Previous</span></a>
<a href="#myCarousel" data-slide="next" class="right carousel-control">
<span class="glyphicon glyphicon-chevron-right"></span><span class="sr-only">Next</span>
</a>
</div>
{% manifest %}
{
"type": "Functional",
"displayName": "Image Slider",
"description": "Configure image slider",
"params": [
{
"id": "interval",
"displayName": "Interval",
"description": "The amount of time to delay between automatically cycling an item."
},
{
"id": "indicator",
"displayName": "Do you want Indicators, Yes or No",
"description": "If users needs to add indicators ."
}
]
}
{% endmanifest %}
Enter the following statement that references our imageslider template in the section you wish to display the slide show,
{% include "imageslider" %}
watch?v=DmkPLR_rUV0