graze icon indicating copy to clipboard operation
graze copied to clipboard

How to use relative urls?

Open mcapodici opened this issue 9 years ago • 1 comments

Hi I am porting Twitter Bootstrap to a Graze template, and I want to include relative URLs to the assets.

I have tried @Url.Content("~/images/logos/hdr.png"), as you would do in ASP.NET MVC, and I get this error message:

RazorEngine.Templating.TemplateCompilationException: Unable to compile template. The name 'Url' does not exist in the current context

I guess because there is no request from which to get a url. Is there another way to achieve this in Graze? How did you manage this for your site?

mcapodici avatar Mar 05 '15 02:03 mcapodici

How about just to use "./assets" for inline and "../assets" for css files

romanov avatar Apr 27 '15 21:04 romanov