Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • René Andersen 238 posts 684 karma points
    Aug 25, 2014 @ 15:53
    René Andersen
    0

    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é

  • Jeroen Breuer 4908 posts 12265 karma points MVP 5x admin c-trib
    Aug 25, 2014 @ 18:06
    Jeroen Breuer
    0

    Hello,

    I'm still using the structure from this blog, but I added this little trick: https://twitter.com/zpqrtbnk/status/492247240657100800

    Jeroen

  • René Andersen 238 posts 684 karma points
    Aug 26, 2014 @ 10:34
    René Andersen
    0

    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é

  • Jeroen Breuer 4908 posts 12265 karma points MVP 5x admin c-trib
    Aug 26, 2014 @ 10:41
    Jeroen Breuer
    0

    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:

    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>();
        }
    }

    More info about the ApplicationEventHandler here: http://our.umbraco.org/documentation/Reference/Events/application-startup#UsingApplicationEventHandlertoregisterevents

    Jeroen

  • René Andersen 238 posts 684 karma points
    Aug 26, 2014 @ 11:32
    René Andersen
    0

    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é



  • Jeroen Breuer 4908 posts 12265 karma points MVP 5x admin c-trib
    Aug 26, 2014 @ 11:41
    Jeroen Breuer
    0

    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

Please Sign in or register to post replies

Write your reply to:

Draft