add output of %link directive to variable?

99 Views Asked by At

In my master a partial _styles is loaded. In this _styles there is a ^var styles = "" Now in all my views or partials I can say var styles = styles+"another style"

Normally a style is defined as

%link{ href="../../content/css/partial.css" rel="stylesheet" type="text/css" }

How can I append the output of the %link directive to the styles variable?

1

There are 1 best solutions below

4
On BEST ANSWER

I wrote a post about adding styles and links with the NHAML.
This should do all job for you.