This project is read-only.

Content Bing Map

Topics: General, Writing themes
Jun 20, 2011 at 3:59 PM

Hi, I have a question regarding a best practice within Orchard.

I have a Bing Map component that I would like to insert into several Orchard Pages, but I'm not sure the best way to handle it.

For example I started by just using a widget layer on each page and including the specific HTML 'blob' + injecting the several .js files in the document.cshtml but I'm not sure thats the best way due to some .js errors ect. regarding initialization when map object is not found. So I was thinking of using a content type but that really is not necessary for what I'm doing since it really is a static object and shouldnt be changed (at this point). I also was thinking a zone view but that seems to be applied to all page layouts which is not what I would like ( i dont think).

In your opinions how should I treat this?

The Page is (about-us) using a widget layer.I would prefer to somehow keep this content all together (map specific HTML content + .js includes). I'm a little hazy on how the views are injected although I have had success with content-type views. I belive I can inject a specific content view by ID "content-42.cshtml", but during my testing this didnt work as expected, certainly could be user error. I guess what would be ideal is a VIEW that is named by page name (ie Content-about-us.cshtml) but during my testing this didnt work either. I'm just trying to get my head around how to treat this content overall or types of content like this in the future. I am more the UI guy so any delving into the .CS files is probably not likely if at all avoidable.


-Page (about-us)

- Widget layer (about-us layer)

Map needs to inject into the default Content Zone via some means, be it a custom view or other.

Any help or thoughts would be appreciated.

Thanks in advance.




Jun 20, 2011 at 11:02 PM

There's already a Bing maps module, have you looked at that to see if it does what you need, or just to see how it works?