Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hello,
I was wondering how i should modify the following code in order to have extrernal images in my slideshow instead of pointing into local saved images (/images/sampleimages/img1.jpg)
<!-- first-slide -->
<li class="slider-item">
<div class="slider-image">
<a href="<?php print base_path();?>"><img src="<?php print base_path() . drupal_get_path('theme', 'simplecorp') ;?>/images/sampleimages/img1.jpg" alt="" /></a>
</div>
<div class="flex-caption">
<h3>Test Title</h3>
</div>
</li>
Comments
Comment #1
Sandip Choudhury CreditAttribution: Sandip Choudhury commentedProbably it is possible my changing this url - "/images/sampleimages/img1.jpg" to "http://www.yoursitename.com/imagename.jpg".
Try this, but I do not know whether external images will be acceptable by theme in this place or not.
If got success, please give the feedback.
Comment #2
Kevin Morse CreditAttribution: Kevin Morse commentedThe way I handled this is to create a View with the display format of HTML list and set the classes to match the existing code for the slider.
I then created a content type for Slider Images with an Image field and set the view to display the Image and Body fields of Published slider images. This way my users can upload new images or edit captions without touching any code.