wkwk
how to get full url on xtblog twig code , example :
i create a post with title "wawawa saya kencot wa"
but in url just show "/__xtblog_entry/10668911-wawawa-saya"
how to get full url /__xtblog_entry/10668911-wawawa-saya-kencot-wa
Graham
wkwk <xt:canonical_uri />
This ONLY returns output when
A forum is on the page (broken if no category or forum post is open)
A blog POST is open
This function is not available in xtscript
Graham
wkwk it is stored as a part of the data array how you get the url depends on the context
I Have no idea why your url is truncated
my tests have no problem
AH-SID
wkwk As long as I know, it happened when we use mobile phone, but when we use touch phone or PC the url is full.
You can use trick meta refresh in {% block entry_post %} by get url blog by javascript and get url blog by twig. Like here:
<script>
var urlbyjs = location.href;
var urlbytwig = '{{ data.post.url }}';
if (urlbyjs != urlbytwig) {
document.write(
'<meta http-equiv="refresh" content="0; url='+urlbytwig+'">'
);
}
</script>
Copy code
You can modify it just like you want..
Rare
Use this script,
<script>
/* Getting URL of page
*/
var d = document;
d.getElementById('u').innerHTML = d.URL;
</script>
<div id="u"></div>