By Juan Carlos Zayas on Friday, 27 November 2015
Posted in General
Replies 10
Likes 0
Views 586
Votes 0
I wanted to know how to add #rt-mainbody to readmore buttons or to all links that are used in browser. Any idea?
Hey Juan,

I am assuming that you are referring to EasyBlog? You can actually customize the theme file in /components/com_easyblog/themes/wireframe/blogs/latest/default.main.php and locate the codes below:


<?php if ($post->hasReadmore() && $this->params->get('post_readmore', true)) { ?>
<div class="col-cell eb-post-more text-right">
<a class="btn btn-default" href="<?php echo $post->getPermalink();?>"><?php echo JText::_('COM_EASYBLOG_CONTINUE_READING');?></a>
</div>
<?php } ?>


Also, you might want to create a template override for this http://stackideas.com/docs/easyblog/administrators/customizations/template-overriding
·
Friday, 27 November 2015 13:34
·
0 Likes
·
0 Votes
·
0 Comments
·
How would I add #rt-mainbody to every link ? should i look into jroute:: if so where?
·
Saturday, 28 November 2015 09:36
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey there,

I am really sorry for the delay of this reply as it is a weekend for us here.

I have a little bit lost here, do you mean add `#rt-mainbody` into all Easyblog permalink? If no, perhaps you can elaborate more detail regarding with your current requirement?
·
Monday, 30 November 2015 13:33
·
0 Likes
·
0 Votes
·
0 Comments
·
sure sorry if I have been unclear. I would like to add the following tag "#rt-mainbody" to every link that is pressed. So for example if I press the readmore button link or a navigation link I get:
http://elearnernetwork.org/business.html

I would like to automatically append "#rt-mainbody" to all links so the result would be:
http://elearnernetwork.org/business.html#rt-mainbody

Do I need to look at the JRoute code to do this? Thanks in advance...
·
Tuesday, 01 December 2015 01:25
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey Juan,

I am sorry for the delay of this reply,

Thanks for take your time explained again with your current requirement.

It seems like my colleague already point to the correct place which you can hack in.

You can refer on this file -> JoomlaFolder\components\com_easyblog\themes\wireframe\blogs\latest\default.main.php


// LINE 183
<a class="btn btn-default" href="<?php echo $post->getPermalink();?>"><?php echo JText::_('COM_EASYBLOG_CONTINUE_READING');?></a>

// Replace with
<a class="btn btn-default" href="<?php echo $post->getPermalink() . '#rt-mainbody';?>"><?php echo JText::_('COM_EASYBLOG_CONTINUE_READING');?></a>




And if do not like to every time replace back your hack file, you can follow what my colleague suggested you override in your template, you can refer this following documentation.

Also, you might want to create a template override for this http://stackideas.com/docs/easyblog/administrators/customizations/template-overriding

Reference link : http://stackideas.com/docs/easyblog/administrators/customizations/template-overriding

Hope this help.
·
Tuesday, 01 December 2015 11:54
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Thank you for your response, but this did not work. Also the directions to create a template override were unclear so I did not pursue that. Any other ideas?
·
Wednesday, 02 December 2015 01:22
·
0 Likes
·
0 Votes
·
0 Comments
·
Also I am using the vintage theme. I tried the code there as well but it did not work either...
·
Wednesday, 02 December 2015 02:17
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey Juan,

I am sorry for the delay of this reply,

If you using Vintage theme, you have to modify on this file -> JoomalFolder\components\com_easyblog\themes\vintage\blogs\latest\default.main.php


// LINE 180
<a class="btn btn-default" href="<?php echo $post->getPermalink();?>"><?php echo JText::_('COM_EASYBLOG_CONTINUE_READING');?></a>


//Replace with
<a class="btn btn-default" href="<?php echo $post->getPermalink() . '#rt-mainbody';?>"><?php echo JText::_('COM_EASYBLOG_CONTINUE_READING');?></a>


Regarding the template override, you have to move your current default.main.php file into JoomlaFolder/templates/YourTemplate/html/com_easyblog/blogs/latest/default.main.php

Hope this help.
·
Wednesday, 02 December 2015 10:26
·
0 Likes
·
0 Votes
·
0 Comments
·
No luck still I tried both the JoomlaFolder/templates/YourTemplate/html/com_easyblog/blogs/latest/default.main.php and overriding the Vintage theme code as per your instructions... still no luck... anything else I could try?
·
Wednesday, 02 December 2015 11:49
·
0 Likes
·
0 Votes
·
0 Comments
·
Can you provide us with your Joomla backend and FTP access into http://stackideas.com/dashboard/site so we can take a look of this?
·
Wednesday, 02 December 2015 12:29
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post