By Peter Adams on Thursday, 04 September 2014
Posted in Technical Issues
Likes 0
Views 695
Votes 0
If I go to a category list of blog entries or anywhere else in my site, I see links to the SEF url for a blog entry. I created a template override that uses the same URL generation method as the stock template, but it's not creating SEF links. Basically, instead of this:

/about/blog/15-my-blog


I see this kind of url:

/about/blog?view=entry&id=15


Is there a way to get the SEF url in a template override? I'm currently doing this:

EasyBlogRouter::_('index.php?option=com_easyblog&view=entry&id=' . $post->id )


Thanks!
Hello Peter,

Sorry for late reply to this,
Is it possible guide us how to you create a template override file and which page display this non-SEF URL?

Perhaps provide us with your Joomla backend and FTP access so we can better have a look.

before you guide us, can you try add this following code in your file and see how it goes?
require_once(JPATH_ROOT . '/components/com_easyblog/router.php');
·
Thursday, 04 September 2014 11:35
·
0 Likes
·
0 Votes
·
0 Comments
·
That line is what I was missing. The way I created the template overrides was to create the template override in:
JPATH_ROOT/templates/my-template/html/mod_latest_blogs


I did this through the Joomla admin by going to Extensions > Template Manager. I clicked my template name under the Template column, then added the override on the Create Overrides tab. Joomla automatically copied over the original file into my template directory, but the default file doesn't include that require_once() call (presumably because it's included earlier on in the process).

Once I added the require_once() you provided, it generated the SEF friendly URL I was expecting to see.

Thanks for your help!
·
Thursday, 04 September 2014 12:12
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Peter Adams,

You're welcome, glad to heard your issues resolved.
·
Thursday, 04 September 2014 12:38
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post