Can't see title?
Permalink Browser Info Environment
Hi,
Great add-on. Descriptions are showing nice, but I can't get titles (Concrete 5.6.1.2)?
Tom
Great add-on. Descriptions are showing nice, but I can't get titles (Concrete 5.6.1.2)?
Tom
Type: | Discussion |
---|---|
Status: | In Progress |
This is a great add-on! It would be even better if it could display the title. I'm not very good with php but wondering if you could explain how to display the title. I would like to display it above the caption.
Thanks
Tom
Thanks
Tom
You can always type title at the description area to display at the slider caption. but if you need to add title field to caption just open:
\packages\whale_nivo_slider\blocks\whale_nivo_slider\view.php
and edit this line (line 16):
to
\packages\whale_nivo_slider\blocks\whale_nivo_slider\view.php
and edit this line (line 16):
echo '<img src="'.$f->getRelativePath().'" alt="'.$item['itemTitle'].'" title="'.$item['itemDesc'].'" data-thumb="'.$f->getRelativePath().'" >';
to
echo '<img src="'.$f->getRelativePath().'" alt="'.$item['itemTitle'].'" title="'.$item['itemTitle']."<br>".$item['itemDesc'].'" data-thumb="'.$f->getRelativePath().'" >';
Hi,
Does this code still apply to the latest version? I am not seeing your code on the version I'm using.
Thanks!
Does this code still apply to the latest version? I am not seeing your code on the version I'm using.
Thanks!
Yep, it should.
Here's the entire contents of view.php in the version I'm using:
<?php /** * @author shahroq <shahroq \at\ yahoo.com> * @copyright Copyright (c) 2013 shahroq. *http://killerwhalesoft.com/c5/addons/... */ defined('C5_EXECUTE') or die("Access Denied."); ?> <div class="slider-wrapper <?php echo "theme-".$theme_title;?>" id="<?php echo "slider-wrapper-".$bID; ?>"> <div id="<?php echo "nivo-slider-".$bID; ?>" class="nivoSlider" style="width: 100% !important;"> <?php foreach($items as $item) { echo (strlen($item['itemUrl'])>1) ? '<a href="'.$item['itemUrl'].'">' : ''; echo '<img src="'.$item['itemImageSrc'].'" alt="'.$item['itemImageAlt'].'" title="'.$item['itemImageTitle'].'" data-thumb="'.$item['itemImageSrc'].'" >'; echo (strlen($item['itemUrl'])>1) ? '</a>' : '';
Viewing 15 lines of 47 lines. View entire code block.
Yep, it's the same, just replace code mentioned above and it will work.
The title field is just use for image tab/title of img tag.