insert images to Carousel widget
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2017 11:24 AM
Hello I have a requirement to insert the images in Carousel widget , some how i find this post which answered but when i follow the same the other images in Sp_carousel_slide table is showing and if the image size is different then it is expanding the width and height of the carousel . Can some one help me in just adding the images to carousel
FYI: i created the different carousel name and added images there but default images are also showing up .
HTML
- <div id="homepage-search" class="hidden-xs wrapper-xl">
- <div class="wrapper-xl">
- <h1 class="text-center text-4x m-b-lg sp-tagline-color" ng-bind="options.title"></h1>
- <h4 ng-if="options.short_description" class="text-center m-b-lg sp-tagline-color" ng-bind="options.short_description"></h4>
- <sp-widget widget="data.typeAheadSearch" />
- </div>
- </div>
- <div class="pull-in" id="sp-carousel">
- <uib-carousel interval="options.interval">
- <uib-slide ng-repeat="slide in ::data.slides" active="slide.active">
- <div class="container">
- <a href="{{::slide.url}}">
- <img ng-src="{{::slide.background}}" style="margin:auto; width:100%;"/>
- </a>
- </div>
- </uib-slide>
- </uib-carousel>
- </div>
CSS
- .sp-tagline-color {
- color: $sp-tagline-color;
- }
- #sp-carousel {
- position: absolute;
- left: 0px;
- top: 0px;
- }
- #homepage-search {
- z-index: 5;
- }
Server Script
- data.slides = $sp.getRelatedList('sp_carousel_slide','carousel');
- var typeAheadSearchOpts = {title: gs.getMessage('How can we help?'), size: 'lg', color: 'default'};
- data.typeAheadSearch = $sp.getWidget('typeahead-search', typeAheadSearchOpts);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2017 11:29 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2017 11:37 AM
Hello Dustin , i did that and it is using the other Carousel images too and how to make the images standard size in the Carousel? can we change the carousel height and width ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2017 11:48 AM
So your image is showing, as well as the OOB images? If that is the case, you would just need to remove those images in the "Carousel Slides" list for that widget instance.
Inspecting the OOB images shows they are 1022x300px. You can use whatever size you like but having different sized images would not be ideal aesthetically.
I don't believe the image sizes can be altered within ServiceNow. You would need to modify that size within an image editor prior to uploading.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2017 03:52 PM
what if i want to add another Carousel and different images ?