Folder structure in Embedded Resource

71 views
Skip to first unread message

Rana

unread,
Sep 19, 2011, 9:13:15 AM9/19/11
to mvccontrib-discuss
There is quite a large project I am hoping to move into Portable Area;
my problem is, I have a lot of javascript files which are part of
packages and needs to retain a particular folder structure;

for example, I use CKEditor which uses a file ckeditor.js to launch
several scripts file in /ckeditor/adapter and so on.

Now if I embed all the files retaining the folder structure, the only
way I can access that file is by:

scripts/ckeditor.adapter.filename.js

where the existing launch file refers to it as: scripts/ckeditor/
adapter/filename.js

to me, the fix seems to be quite simple.
MvcContrib.PortableAreas.EmbeddedResourceController has a method

public ActionResult Index(string resourceName, string resourcePath);

I believe I can just replace all folder slashes in resourceName to
dot; and that should do the trick.

My question is, is there a better/easier way to achieve it. Knowing
it's not possible to change all script libraries for image/script/css
path references.

regards

Rana


Kevin

unread,
Sep 19, 2011, 5:44:55 PM9/19/11
to mvccontrib-discuss
I have exactly the same question, also for a large project. I look
forward to the response.

On a separate note, Rana, when you begin developing with the Portable
Areas you'll find that js and css development is slowed down
considerably by the need to recompile at each iteration (since the
content files are all compiled as embedded resources). The following
post discusses a few settings changes to IIS - namely adding a virtual
directory for the portable area - that allows you to avoid this and to
continue working directly with the file system files.

http://groups.google.com/group/mvccontrib-discuss/browse_thread/thread/966a12e7009b310e
Reply all
Reply to author
Forward
0 new messages