Linebreaks in Titles and Captions
Permalink Browser Info Environment
Hi Jordan,
is it somehow possible to use linebreaks in Titles and/or captions?
I used the br-tag <br/> and it didn't work.
Any idea?
Thanx
Tom
is it somehow possible to use linebreaks in Titles and/or captions?
I used the br-tag <br/> and it didn't work.
Any idea?
Thanx
Tom
Type: | Discussion |
---|---|
Status: | New |
For the captions, you can add this line to your site's config/site.php file:
Unfortunately, this only applies to the captions and not the titles. For the titles, you'll want to edit the file "/packages/deluxe_image_gallery/blocks/deluxe_image_gallery/controller.php", find this line (should be around line #44):
...and change it to this:
define('DELUXE_IMAGE_GALLERY_HTML_CAPTIONS', true);
Unfortunately, this only applies to the captions and not the titles. For the titles, you'll want to edit the file "/packages/deluxe_image_gallery/blocks/deluxe_image_gallery/controller.php", find this line (should be around line #44):
$image['title'] = htmlentities($file['title'], ENT_QUOTES, APP_CHARSET);
...and change it to this:
$image['title'] = $file['title'];
Thank you for your answer.
replace
<?php foreach ($images as $img): ?>
with
<?php foreach ($images as $img):
$img['title']=str_replace("@@", "<br/>",$img['title']);
$img['caption']=str_replace("@@", "<br/>",$img['caption']);
?>
in view.php
/httpdocs/cms/packages/deluxe_image_gallery/blocks/deluxe_image_gallery
and then use @@ in titles and captions wherever I want linebreaks.