In earlier versions of Umbraco I used "umbracoInternalRedirectId" and the structure looked like this:
- Site settings - Home - Text page - Another text page
I used the Site settings to choose wich page should be the frontpage and I stored the Google Analytics etc.
Is this the right way to do it in Umbraco 7? I have tried and I discovered a problem so when you click "home" in the top navigation it redirect to "http://localhost:49639/home/" where in ealier versions it redirected to "http://localhost:49639/".
Is there another way to do it in Umbraco 7? And can you recommend a very simple starter kit with the right website structure for Umbraco 7?
The HomeUrlProvider is just a class so it doesn't matter where you create that. At the end of the example it says: "Register the HomeUrlProvider on ApplicationStarting". This is how I register it:
public class UmbracoEvents : ApplicationEventHandler
{
protected override void ApplicationStarting(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext)
{
//With the url providers we can change node urls.
UrlProviderResolver.Current.InsertTypeBefore<DefaultUrlProvider, HomeUrlProvider>();
}
}
To be honest I don't understand it at all. Is it possible to find a very simple starter kit where this method is used?
Im am not sure where to insert the example code and where to insert your code.
I have been away from Umbraco for a year because my school are using PHP based CMS systems. I just feel that Umbraco is the best CMS system to use and I keep coming back to it.
But I feel that I miss the fundamental understanding in a problem like this.
Website structure
Hi
In earlier versions of Umbraco I used "umbracoInternalRedirectId" and the structure looked like this:
- Site settings
- Home
- Text page
- Another text page
I used the Site settings to choose wich page should be the frontpage and I stored the Google Analytics etc.
Is this the right way to do it in Umbraco 7? I have tried and I discovered a problem so when you click "home" in the top navigation it redirect to "http://localhost:49639/home/" where in ealier versions it redirected to "http://localhost:49639/".
Is there another way to do it in Umbraco 7? And can you recommend a very simple starter kit with the right website structure for Umbraco 7?
Thanks in advance!
// René
Hello,
I'm still using the structure from this blog, but I added this little trick: https://twitter.com/zpqrtbnk/status/492247240657100800
Jeroen
Hi Jeroen
I am not sure where to insert all that code and how to make it work properly?
Can you give me at hint? :-)
// René
Hello,
The HomeUrlProvider is just a class so it doesn't matter where you create that. At the end of the example it says: "Register the HomeUrlProvider on ApplicationStarting". This is how I register it:
More info about the ApplicationEventHandler here: http://our.umbraco.org/documentation/Reference/Events/application-startup#UsingApplicationEventHandlertoregisterevents
Jeroen
Hi Jeroen
To be honest I don't understand it at all. Is it possible to find a very simple starter kit where this method is used?
Im am not sure where to insert the example code and where to insert your code.
I have been away from Umbraco for a year because my school are using PHP based CMS systems. I just feel that Umbraco is the best CMS system to use and I keep coming back to it.
But I feel that I miss the fundamental understanding in a problem like this.
// René
Hello,
You could create a new project in Visual Studio and use the code in there. Than compile it into a dll and place that in the Umbraco bin folder. You could also do it in app code folder. This blog might help: http://www.theoutfield.net/blog/2014/07/why-we-use-website-projects-for-umbraco-development
Sorry I don't have a starter kit example for this.
Jeroen
is working on a reply...