How would I go about adding the ability for the slideshow items to link somewhere? They look really nice, but they take up a lot of space and can't link anywhere. Usually slideshow items will link off to another page on the site.

Comments

Deaf Guy’s picture

I agree - I found a way to do it by adding the link HTML in the Slide Title. It works but then when you hover over the photo, the HTML code is part of the slide tool tip which is really ugly.

Is there any other way to do it?

VM’s picture

Status: Active » Fixed

based on the theme you would need to generate a subtheme and edit the page--front.tpl.php file of the subtheme where the slides are printed.

FROM:

<div class="slide_image">
            <?php print $slideimage1; ?>
            <?php print $slideimage2; ?>
            <?php print $slideimage3; ?>
          </div>

TO:

<div class="slide_image">
            <a href="http://yourlink.com"><?php print $slideimage1; ?></a>
            <a href="http://yourlink.com"><?php print $slideimage2; ?></a>
            <a href="http://yourlink.com"><?php print $slideimage3; ?></a>
          </div>

personally, I'd remove the built in image slideshow feature and utilize the views slideshow module or similar where fields could be used for the image and the link.

Deaf Guy’s picture

OK thank you this helps a lot.

Ujval Shah’s picture

Status: Fixed » Closed (fixed)
jsimonis’s picture

Switching out to the views slideshow would mean a lot of time to replicate the look. I was hoping there would be a way to do this within the theme. They really liked the look of the slideshow, but it takes up a lot of real estate on the page without linking anywhere. I normally use views slideshow, but they were very specific that they wanted this slideshow and wanted it to look that way. Guess I'm looking at a ton of styling time to make it look the same.

Not sure why it says Closed (Fixed) since it's not actually fixed. The solution is to completely remove the slideshow and rebuild it another way. That seems more like a "Wont't Fix" kind of situation.

VM’s picture

using views slideshow isn't the only solution provided in my comment. I'm not sure what else you are asking for by way of the theme layer? The only other way to deal with this would be for the slideshow feature of the theme to be a module at which point you could utilize fields for the images and the links. That feature would be outside the scope of what can be distributed within a theme.

Deaf Guy’s picture

I wanted to comment and see if this helps you with the slideshow issue. I was able to figure out how to manipulate the text to make them link to a story. I also figured out how to make those little dots in lower right link to the same page as the story text.

Anyway, with a lot of CSS editing, I was able to get my bluez theme looking like this:

http://designerandpublisher.com/_forum-images/frontpg1.jpg

I found that if you change the photo images to a lower height (for example 500px high to 450px high) you will reduce the height somewhat of the slider so it doesn't look so overwhelming. After experimenting, I decided to just leave it at the height that bluez has as the default.

If you want to add links to the images, go into the template page called:

page--front.tpl.php

There you will find some code that you can manipulate to make text for the slides links. Here is a screenshot of my code in that file that makes the text links. The example below only shows link code to one of the images as I have not added it for the other slides yet:

http://designerandpublisher.com/_forum-images/frontpg2.jpg

Above is what that PHP code looks like in Dreamweaver. Anyway, editing the code in that PHP file will allow you to make text links for each slide.

Further down in the same PHP you will see:

http://designerandpublisher.com/_forum-images/frontpg3.jpg

Where it says paging. Add a URL in between the " symbols and that will make those little counter dots in the slider link to the same page as the text links for each slide. Hope this helps.

VM’s picture

All makes sense except you shouldn't be editing the bluez theme files directly. A subtheme should be created else when/if this theme is updated your changes will be overwritten or at the very least will have to be performed again.

Deaf Guy’s picture

OK can you just elaborate a little more on what you mean by a sub-theme? I've put a lot of work into customization of this theme. To avoid future problems, what do you suggest I do to take what I've already done and turn it into a sub-theme?

If you could just have a few step-by-steps in your reply that would be very helpful too.

VM’s picture

subtheme docs - https://www.drupal.org/node/225125

general steps

create a folder in sites/all/themes and name it subtheme (whatever you want)
add a subtheme.info file (must be same name as folder created above).

within the .info file you will need to add:

name = My sub-theme
description = This is a sub-theme of bluez theme
core = 7.x
base theme = bluez

then add to the .info

stylesheets[all][] =  custom.css

create a custom.css file for the subtheme.

copy over the regions in the base theme.info file to the subtheme.info file

when you need to change CSS add it to your custom.css file

when you need to alter a tpl.php file copy it from the base theme to the subtheme

now when bluez requires an update it can be updated without adversely affecting any custom changes made to the theme.

Other questions related to the generation of a subtheme should be asked in the forums so as not to generate noise in this thread or this theme's issue queue.

Deaf Guy’s picture

Thanks for your help. I'll go ahead and do this.

jsimonis’s picture

Well, the other method meant them going into the theme files every time they wanted to change the slideshow. That is not an option for people who have no idea what theme files are, html, how easily you can mess them up, etc.

I've seen other themes where you got the option inside Drupal to set the image, text, and a link. I was hoping there was a bit of code I could add to the theme in order to have that become available inside Drupal. It seems like a huge waste of page real estate to have a slideshow that doesn't then link off to anywhere. As far as I have seen, slideshows always link somewhere else.

Oh well, I talked them into a different theme where we could easily do what they needed to do. They can't afford to have a developer having to go in and do work every time they want a small content change. That's the whole point of a CMS.

VM’s picture

I don't consider theme elements to be content intended to be handled by a CMS. It is my understanding concerning a CMS (at least with Drupal) that content is separated from the theme layer. Therefore, if the slides are meant to be content, a content type can be generated with the fields required and a slideshow set up in a block at which point it can be used on any theme. In short, theme elements aren't content but content can be used as theme elements.

I'm happy to read that you solved your issue. It would have been a great help to users in this thread seeking the same features set if you had taken the time to mention the theme you utilized that included the feature set you mentioned.