How to change Content Url Path (/_content/...)

22 views
Skip to first unread message

Salvador Gascon

unread,
Feb 6, 2012, 1:30:29 PM2/6/12
to FubuMVC Development Group
Hi all,

I created an web application (with modules) using FubuMvc, Spark and
Bottles.

In module i have the following file "/Content/Scripts/one.js" file and
the "package manifest file" with this :
...
<ContentFileSet Include="Handlers/*.spark;*.config;Content/*.*;Shared/
*.spark">
<DeepSearch>true</DeepSearch>
</ContentFileSet>
...

I have set "one.asset.config" file :
ordered set jsFiles is
one.js

and added to my spark view this line :

# this.Asset("jsFiles");
${this.WriteScriptTags()}

It works well, but the url path for "one.js" is : "/_content/scripts/
one.js"

How to change to another url path to avoid conflicts with others
modules or where i can find an example?

I tried use or find some example using "alias" or "links", but have
not found any

Any idea or example?

Thanks all.





ahjohannessen

unread,
Feb 7, 2012, 5:44:36 PM2/7/12
to fubumv...@googlegroups.com
Hi Salvador, 

Currently, one way to avoid conflicts with other packages is to put a folder named as your package under the asset folder, e.g.

content/scripts/pack1/one.js 

and have your asset.config file defined like this:

ordered set JsFiles is
pack1/one.js

I can't remember if prefixing the package via "this.Asset("pack1::jsFiles");" works - if it does, then the above should not be necessary.
Reply all
Reply to author
Forward
0 new messages