Copied to clipboard

Flag this post as spam?

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


  • gilad 185 posts 425 karma points
    Mar 28, 2012 @ 18:10
    gilad
    0

    Hide folder name from url

    Hi everyone.

    I have site with this structure :

    Content
    -- 
    Site structure
    ---- Home
    ---- About
    -- Site data
    ---- Some data items.

    now i want to make another site like that but a multi-languages site so it should look like this:

    Content
    -- Site 1
    ---- 
    Site structure
    ------ Home
    ------ About
    ---- Site data
    ------ Some data items.
    -- Site 2
    ---- 
    Site structure
    ------ Home
    ------ About
    ---- Site data
    ------ Some data items.

    so now lets say the about page url look like this : domain/Site-structure/about

    should be like this : domain/about

    Thanks in advance.

  • Mike Chambers 635 posts 1252 karma points c-trib
    Mar 28, 2012 @ 18:43
    Mike Chambers
    0

    IMHO. strange way to be setting up a multiple site hierarchy... eg site-data/some-data-items/* will end up as phyical ulrs to be accessed... 

    also shouldn't your home page be the root of your site? eg home>about not both at the same level... if it's that you want "home" to appear in the url then you can change the setting to remove top level items in the web.config {add key="umbracoHideTopLevelNodeFromPath" value="true" /}

    http://our.umbraco.org/wiki/how-tos/running-multi-lingual-sites-under-a-single-domain

    What data are you storing in the sitedata? could it all be placed as properties on the HomePage documenttype? or maybe as media items (with a new mediadatatype to suit your purposes)

    to get it to work like you want could be quite involved... you could override the NiceUrl method to strip your SiteStructure level... and then add a urlrewrite rule to rewrite domain/.* to domain/Site-structure/.* but that only covers nicerurl used in your macros(xslt or usercontrol)...  if you add a link in the content ie  href="/{localLink:1064}" you'd also need to overwrite the render method of the content to sort local links that's as far as I got to before I thought this isn't the way to go. So we kept the content tree for stuff that did require a phyical url and anything else approached from a different tack....

    Probably not exactly what you wanted to hear...

     


     

  • gilad 185 posts 425 karma points
    Mar 29, 2012 @ 12:46
    gilad
    0

    Hi mike.

    Thanks for answer.

    In site data i store items that can be pull from macros in text editor of any page in my site strucure.

    lets say - gallery

    Even if i set the Site structure to Home.

    all urls in site start with home  ( domain/home/..... )   :(

    how can i overwrite the render method of the content to sort local links?


  • Mike Chambers 635 posts 1252 karma points c-trib
    Mar 29, 2012 @ 13:08
    Mike Chambers
    0

    gallery items could perhaps be done in the media section? and pulled from there.. (with a new media type maybe to exend on the simple image one...)

    We made a decision to steer clear of macros in the RTE issues with chrome "aw snap" and also adding extra <p></p> depending on where in the content the macro was inserted.

    When it started to get this complex to complete what we were trying to do we decided to embrace umbraco as it was rather than radically extend and have issues with updates/patches - outsourcing tasks etc later down the line...

    http://our.umbraco.org/forum/developers/extending-umbraco/4589-Overriding-umbraco-locallink-parser was a starting point, were we to continue.

Please Sign in or register to post replies

Write your reply to:

Draft