Make entire thumb clickable
- Posted by jeff popkin (10) Offline
I am using the carouseltxt theme on the "featured Events" section of our homepage. I was wondering if there is a way for me to make the entire thumbnail clickable to the story instead of just the article title?
Boston Event Guide
1 year 1 week ago #1
by jeff popkin
Boston Event Guide
Please Log in or Create an account to join the conversation.
- Posted by TemplatePlazza (5232) Offline
You can do it via template override as well. You just need to move the <a> tag from the title to above the item container. In this case, you only need to modify the carouselxt.php file on line 194 as follows:into this
Then, add the following code:before line 179And its closing tag on line 282 before:
1 year 1 week ago #2
by TemplatePlazza
<h4 class="mfp_carouselxt_title">
<a href="<?php echo $item->link; ?>" itemprop="url">
<?php echo JHtmlString::truncate(strip_tags($item->title), $title_truncate); ?>
</a>
</h4>
<h4 class="mfp_carouselxt_title">
<?php echo JHtmlString::truncate(strip_tags($item->title), $title_truncate); ?>
</h4>
Then, add the following code:
<a href="<?php echo $item->link; ?>" itemprop="url">
<div class="mfp_carouselxt_item">
<?phpendforeach; ?>
Please Log in or Create an account to join the conversation.