AH-SID
alizainal.aljufri {% set id = data.post.url|split('/__xtblog_entry/')|last|split('-')|first %}
{% set url = 'http://your.xtgem.com/p/__xtblog_entry/'~data.post.url|split('?')|first|split('/__xtblog_entry/')|last|replace({(id~'-'):(id~'/')})~'.html?__xtblog_block_id=1' %}
Copy code
The code above is for view == 'entry'
For view == 'entries_list':
Just use the same code, than change
data.post.url into
entry.url
Than use it in html anchor link: <a href="{{url}}">{{entry.title}}</a>
note:
you can edit your xtblog's url like that but you have to know that url xtblog in rss feed and link canonical can not be changed
That all.
alizainal.aljufri
AH-SID Thanks for your help. It's success but related post is eror! Check now
http://alizainaljufri.jw.lt
alizainal.aljufri
AH-SID Yes, right. I get the code from your site.
AH-SID
alizainal.aljufri Because you changed your xtblog url in entries list, so you have to edit xtblog url in related post widget too.
Use same code at file related.twig inside {% set temp %}
replace for set
data.post.url into
related.url and then change {{related.url}} into {{url}}
Devian
AH-SID i was used your trick about adding related posts but doesn't work bro...
But while I read sir Graham tricks it's works, whats wrong with your trick ?