Copied to clipboard

Flag this post as spam?

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


  • SSA Backend 108 posts 640 karma points
    Aug 10, 2016 @ 13:35
    SSA Backend
    1

    Setup project structure

    Hi All,

    I have a website which should implement next features:

    1. Content available on English and Spain language (resolved)
    2. Each page can have a different content for a mobile view (resolved)
    3. We should be able to create region copy of website on a subdomain
    4. Some pages should be available across all versions (regions) of the website

    Sample of URLs:

    • website.com/en/specific-page-1
    • website.com/es/specific-page-1
    • region.website.com/en/specific-page-1
    • region.website.com/es/specific-page-1
    • website.com/es/agreement (single page)
    • region1.com/es/agreement (single page)
    • region1.com/en/agreement
    • region2.com/es/agreement (single page)

    So if you edit one of the page which marked as "single page" that changes should appear on all linked pages

    Current structure of a project: enter image description here

  • Alex Skrypnyk 6175 posts 24186 karma points MVP 8x admin c-trib
    Aug 11, 2016 @ 22:33
    Alex Skrypnyk
    0

    Hi Dmytro,

    Welcome to Our Forum!

    1. We should be able to create region copy of website on a subdomain -

    Do you know about Manage Hostnames feature?

    Is it what you need?

    I think you need one more root node, if you want to have 2 languages on each copy o site, so structure will be:

    website.com
    -- en
    -- es
    
    region1.com
    -- en
    -- es
    

    Thanks,

    Oleksandr

  • SSA Backend 108 posts 640 karma points
    Aug 12, 2016 @ 10:09
    SSA Backend
    1

    Thank you, it works. Multi-domains feature works well in Umbraco. The next question is about shared content throught multiple content. Do you have any idea/links/video?

    P.S. I will include the whole picture of IIS and Umbraco content when it will be ready.

    Thanks,

    Dmytro

  • Alex Skrypnyk 6175 posts 24186 karma points MVP 8x admin c-trib
    Aug 12, 2016 @ 10:14
    Alex Skrypnyk
    0

    Hi Dmytro,

    The easiest way to share content is to create one more root node - Settings or something like that for storing content that will be shared between all sites.

    Another ways is to get data by code, you can get any node from any node in Umbraco, but you have to think about architecture first.

    So try to describe what type of data will be shared?

    Thanks,

    Oleksandr

  • SSA Backend 108 posts 640 karma points
    Aug 12, 2016 @ 10:28
    SSA Backend
    0

    The easiest way to share content is to create one more root node - Settings or something like that for storing content that will be shared between all sites.

    Yeah, I though about it too, but how to say that it's not an actual page and link to a page from "Shared Content" root node? I believe we will use something similar to "Common About Us" page.

    Thanks,

    Dmytro

  • Alex Skrypnyk 6175 posts 24186 karma points MVP 8x admin c-trib
    Aug 12, 2016 @ 10:38
    Alex Skrypnyk
    100

    If you need to create shared pages, it's not easy to maintain such structure.

    Maybe it will be better to you - leave 2 root nodes, EN and ES, map both domains to these root nodes so website.com/es/ and region.website.com/es will be the same page.

    On page level create dropdown list or checkbox list like - is it common page or what subdomian should see it.

    Thanks,

    Oleksandr

  • SSA Backend 108 posts 640 karma points
    Aug 12, 2016 @ 14:34
    SSA Backend
    2

    Final solution:

    1. Add additional bindings for your IIS website and update hosts file for local developement enter image description here
    2. Setup "Culture and Hosting" setting for each language (root nodes) enter image description here
    3. Create "Domains" picker control. Create an appropriate setting for each page (base page + composition). Now you are able to choose page availability on each domain. enter image description here
    4. Use this extension to check if page is available in current domain. You can hide it from navigation, raise an exception, redirect to a specific page.

      /// <summary>
      /// Check if content is available in the current domain
      /// </summary>
      /// <returns></returns>
      public static bool IsAvailableInDomain(this HttpRequestBase request, IPublishedContent content )
      {
          var pageDomains = content.GetPropertyValue<string>("domain", SharedDomainSetting).Split(new char[] { ',' });
          return pageDomains.Any(x => string.Equals(x, SharedDomainSetting, StringComparison.OrdinalIgnoreCase) 
              || string.Equals(x, request.Url.Host, StringComparison.OrdinalIgnoreCase));
      }
      

    P.S. I believe in future we can work on a starter kit for multi-domain/multi-language/mobile custom website.

    Thanks,

    Dmytro

  • Alex Skrypnyk 6175 posts 24186 karma points MVP 8x admin c-trib
    Aug 12, 2016 @ 14:46
    Alex Skrypnyk
    1

    Great solution, Dmytro, perfect description for forum from you.

    Thanks,

    Oleksandr

Please Sign in or register to post replies

Write your reply to:

Draft