My base url is "http://192.168.1.1/silverstripe/". Site tree looks like this:
home (id=1)
--- good (id=2)
------ article1 (id=4)
------ article2 (id=5)
--- bad (id=3)
------ article1 (id=6)
------ article2 (id=7)
…
When i use sitetree_link id=4 on page "good", SilverStripe return link with href="/silverstripe/home/good/article1". But it's wrong, because expected href is "/home/good/article1", or even "http://192.168.1.1/silverstripe/home/good/article1".
On now moment i have next situation. I need to get complete url in javascript using jQuery. But in this code:
var completeURL = jQuery('base').attr('href') + page;
where 'page' is href of current link (ex. '/silverstripe/home/good/article1'), variable completeURL take value 'http://192.168.1.1/silverstripe//silverstripe/home/good/article1/'.
Can anybody help me to solve a riddle? :-)
Thanks in advance.