I defined a new page. This page includes a link to another sitetree page.
static $has_one = array ( "LinkTo" => "SiteTree", );
The user can create the link in the CMS without problems because in getCMSFields i have
$fields->addFieldToTab("Root.Content.Main", new TreeDropdownField('LinkToID', "Link", "SiteTree"),'Content');
The problem comes with the template usage.
I can access to LinkToID value without problem. It returns a numeric value (for example 5).
But iÃ‚Â´m not interested in the ID. IÃ‚Â´m interested in his URL: for example, the link with the ID 5 is "http://www.mysite.com/who-we-are".
How can i obtain this link?
Another question is, if i have a multilanguage site, this link will be correct with the current language of the site?
Thanks in advance, and excuse me for my poor english.