I would like to embed some content from an external application within Umbraco, for example newsitems. It is undesirable to have those newsitems beeing inserted as content-nodes within Umbraco.
My desired Umbraco tree looks like this:
- Root - About us - News - xxx news item 1..n
Whereby the 'xxx news items 1..n' are located within an external application, retrievable by a webservice call.
The desired url to accesss those newsitems would be something like 'www.mysite.com/news/123-id-of-item/title-of-item'
What would be the best strategy to implement this? Using plain MVC controllers it is quite easy possible, but i also would like to use umbraco functionality on the page like macros (to render menu's and breadcrumbs) and existing template hierarchy. I think it would be possible with IIS url rewriting to rewrite the url with a querystring parameter, but I consider that solution more as a hack than a desirable solution.
Three ideas come to mind for me to recommnend to you: (in order of most-recommended to least-recommended.)
1. Create a "ContentFinder" (in 6.1+ only) - not sure where to send you for more info on this since it's not yet officially documented, but searching these forums might provide more clues on how to do this. If this doesn't work for you, then....
2. Use a UrlRewrite. Don't worry about it feeling "hacky" because it will work beautifully for you and may actually be easier (less complicated) for you to setup. You'd setup something such that /about/news/001/ can actually generate a page normally located at /about/news/?itemId=1234
3. Custom routing. Beware, there are other challenges that come with this, at least in the current version 6.1.2 (any improvements to future versions notwithstanding). Unless you really have a need for this---and your simple routing scenario doesn't seem like it---I'd recommend only considering this as a last resort.
Best of luck to you! Be sure to come back and let us know what you ended up going with.
Custom mvc route for embedding external content
Hi All,
I would like to embed some content from an external application within Umbraco, for example newsitems. It is undesirable to have those newsitems beeing inserted as content-nodes within Umbraco.
My desired Umbraco tree looks like this:
- Root
- About us
- News
- xxx news item 1..n
Whereby the 'xxx news items 1..n' are located within an external application, retrievable by a webservice call.
The desired url to accesss those newsitems would be something like 'www.mysite.com/news/123-id-of-item/title-of-item'
What would be the best strategy to implement this? Using plain MVC controllers it is quite easy possible, but i also would like to use umbraco functionality on the page like macros (to render menu's and breadcrumbs) and existing template hierarchy. I think it would be possible with IIS url rewriting to rewrite the url with a querystring parameter, but I consider that solution more as a hack than a desirable solution.
I am using v6.1.2 by the way.
Three ideas come to mind for me to recommnend to you: (in order of most-recommended to least-recommended.)
1. Create a "ContentFinder" (in 6.1+ only) - not sure where to send you for more info on this since it's not yet officially documented, but searching these forums might provide more clues on how to do this. If this doesn't work for you, then....
2. Use a UrlRewrite. Don't worry about it feeling "hacky" because it will work beautifully for you and may actually be easier (less complicated) for you to setup. You'd setup something such that /about/news/001/ can actually generate a page normally located at /about/news/?itemId=1234
3. Custom routing. Beware, there are other challenges that come with this, at least in the current version 6.1.2 (any improvements to future versions notwithstanding). Unless you really have a need for this---and your simple routing scenario doesn't seem like it---I'd recommend only considering this as a last resort.
Best of luck to you! Be sure to come back and let us know what you ended up going with.
is working on a reply...