Relative LInk

Topics: Administration, Customizing Orchard
Nov 18, 2012 at 11:15 AM
Edited Nov 18, 2012 at 11:15 AM

HOw to make a relative link?


I try it like this: ~/kasten-collectie-2. But that doesnt work.



Nov 19, 2012 at 6:44 AM

What do you mean? From where?

Nov 19, 2012 at 6:19 PM

I figured it out it is wihout '~'. Just for normal page. THX anyway

Dec 19, 2012 at 10:47 AM

That will work as long as the site is not hosted as a virtual subdirectory, so you may want to consider using the Url.Content method and keep using the tilde. Or, upgrade to Razor 2, which should automatically resolve the path (e.g. ~/kasten-collectie-2 would be converted to /orchardlocal/kasten-collectie-2 if you're running in a virtual directory called orchardlocal.