* Graham * toshudhiman I just tested and there is the potential that the editor could convert the " quotes " to entities
so you could use
<!--parser:xtscript-->
var $path=<xt:url type="path" />
<!--/parser:xtscript-->

Copy code

in the _header _footer or _headtags
and {_$$path|} in existing pages title setting and the site option setting for new pages

Or if you already have loads of pages then you could use a bit of javascript in the _header _footer or _headtags
<script type="text/javascript">
document.getElementsByTagName("title")[0].textContent='<xt:url type="path" />';
</script>

Copy code

Which would do all pages

Or this version which looks better because it trims off the leading / and replaces all other / with -
<script type="text/javascript">
  document.getElementsByTagName("title")[0].textContent=('<xt:url type="path" />'.substr(1).replace((new RegExp('/','g')),' - '));
</script>

Copy code
2014-06-05 08:34 (edited 2014-06-05 11:23 by Graham ) · (0)

Online: Guests: 1