Articles has no image by default image display
- Posted by Developer (12) Offline
I am facing two issues.
Questions1: - There is no default image show in case an article has no image.
Questions 2:- How can I add parameters like “on click event” in link. For Ex. –
<a href="/java-tutorial.html" onclick="ga('send', 'event', 'Related_articles', ‘articles name', 'articles name');>java</a>
to all links generated via your module so that I can do tracking in google analytics?
Please help me.
Please Log in or Create an account to join the conversation.
- Posted by Developer (12) Offline
- Posted by TemplatePlazza (5310) Offline
I think you have managed to solve this issue as the thumbnails are displayed on your website.Questions1: - There is no default image show in case an article has no image.
You can do template override for that. Copy the file from :Questions 2:- How can I add parameters like “on click event” in link. For Ex. –
../modules/mod_relateditems_xtd/tmpl/default.php
to
../templates/protostar/html/mod_relateditems_xtd/default.php
and open it using your php editor.
At line 183 / 234 you will see this code :
<?php if ($item_title_header) { ?>
<a href="<?php echo $item->route; ?>"><<?php echo $titletag; ?> class="title" property="genre"><?php echo $item->title; ?></<?php echo $titletag; ?>></a>
<?php } ?>
Simply change it to :
<?php if ($item_title_header) { ?>
<a href="<?php echo $item->route; ?>" onclick="ga('send', 'event', 'Related_articles', ‘<?php echo $item->title; ?>', '<?php echo $item->title; ?>');"><<?php echo $titletag; ?> class="title" property="genre"><?php echo $item->title; ?></<?php echo $titletag; ?>></a>
<?php } ?>
Please Log in or Create an account to join the conversation.
- Posted by Developer (12) Offline
Questions 1:
I have used “Related Items Extended module”.
We have close to 1300 articles at in www.test2.guru99.com/
We are NOT manually set articles images.
What can be done?
Questions 2:
Step 1) I have used templates for “rt_acacia”.
Step 2) I have check /templates/rt_acacia/html/ not display for folder “mod_relateditems_xtd” please check - www.screencast.com/t/vOJATmph
Step 3) I have Changes ../modules/mod_relateditems_xtd/tmpl/default.php At line number 183 / 234 please review it’s correct? - www.screencast.com/t/1wpBjbUbIQiP
Please help me!
Please Log in or Create an account to join the conversation.
- Posted by TemplatePlazza (5310) Offline
Umm isn't it the thumbnails are already generated? I mean this page :I have used “Related Items Extended module”.
We have close to 1300 articles at in www.test2.guru99.com/
We are NOT manually set articles images.
What can be done?
https://www.dropbox.com/s/o03p2j0kldn3dvv/3lcda.jpg?raw=1
And for the default thumbnail, you can easily change this default no-image img to your own image: www.test2.guru99.com/modules/mod_related...xtd/assets/noimg.png
It's indeed not exist, simply create the folder manually there (mod_relateditems_xtd) there to activate the template override function for the moduleQuestions 2:
Step 1) I have used templates for “rt_acacia”.
Step 2) I have check /templates/rt_acacia/html/ not display for folder “mod_relateditems_xtd” please check - www.screencast.com/t/vOJATmph
Do not change the file directly, because it will be overrided when you are aplying an update in the future. That's why we suggested you to do template override as mentioned beforeStep 3) I have Changes ../modules/mod_relateditems_xtd/tmpl/default.php At line number 183 / 234 please review it’s correct? - www.screencast.com/t/1wpBjbUbIQiP
Please Log in or Create an account to join the conversation.