Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use relative urls? #3

Open
mcapodici opened this issue Mar 5, 2015 · 1 comment
Open

How to use relative urls? #3

mcapodici opened this issue Mar 5, 2015 · 1 comment

Comments

@mcapodici
Copy link

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?

@romanov
Copy link

romanov commented Apr 27, 2015

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants