Copied to clipboard

Flag this post as spam?

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


  • Raphael Taranto 20 posts 40 karma points
    Apr 23, 2012 @ 07:12
    Raphael Taranto
    0

    Trying to use with multiple sites

    Hi there,

    I'm trying to use this project in a single umbraco instance with multiple sites.

    It's not a multiple language.

    I am creating two websites for diferente purposes and need to host it in a single umbraco instance.

    I've already tried the following;

    - simples copying the entire tree from HOME node;

    - copying only the template and using the same document type (and after copying the entire tree and changing the template);

    - copying both template and document type (and after creating new pages with new document type and template);

    But with all of those i've got the same result: my main menu and my slideshow are defined by the first tree created for both sites...

    Does somebody know how to fix this?

    Best regards,

  • Peter Nielsen 159 posts 257 karma points
    Apr 23, 2012 @ 08:07
    Peter Nielsen
    0

    Are you using "Manage Hostnames" to set the hostname for the second site? Or how do you know you are on the new site? :-)

  • Jeroen Breuer 4908 posts 12265 karma points MVP 4x admin c-trib
    Apr 23, 2012 @ 12:44
    Jeroen Breuer
    0

    Perhaps it uses an xpath which goes too high in the tree and therefore only looks at the first root node. 

    Jeroen

  • Raphael Taranto 20 posts 40 karma points
    Apr 23, 2012 @ 15:53
    Raphael Taranto
    0

    Hi Peter, I'm using "Manage hostnames".

    But I think it's something relted to what Jeroen said...

    The problem is that even in admin area i can't separete one site from the other, it ignores my second structure, even when I select the second one to edit.... (so I can't make it reflect in the site itself)

    Here folllow some prints:

    I would really apreciate if someone could help me understanding how to solve this issue...

    regards,

    Raphael

  • Peter Nielsen 159 posts 257 karma points
    Apr 23, 2012 @ 15:55
    Peter Nielsen
    0

    Yea I first understod the question when I read it the second time :-)

    Can we see the XSLT for the main menu or/and the slideshow? :-)

  • Raphael Taranto 20 posts 40 karma points
    Apr 23, 2012 @ 15:57
    Raphael Taranto
    0

    For sure!

    Here follows the XSLT for the main menu:

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE xsl:Stylesheet [
      <!ENTITY nbsp "&#x00A0;">
    ]>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxml="urn:schemas-microsoft-com:xslt" xmlns:umbraco.library="urn:umbraco.library" exclude-result-prefixes="msxml umbraco.library">
      <xsl:output method="xml" omit-xml-declaration="yes"/>
      <xsl:param name="currentPage"/>
      
      <xsl:variable name="CssClassName" select="/macro/CssClassName" />
      <xsl:variable name="CssId" select="/macro/CssId" />

      <xsl:variable name="StopLevel" select="/macro/StopLevel" />
      <xsl:variable name="StartLevel" select="/macro/StartLevel" />

      <xsl:template match="/">
          <xsl:call-template name="Navigation">
            <!-- rapha -->
            <!-- xsl:with-param name="childNodes" select="$currentPage/ancestor-or-self::*[@isDoc][@level=($StartLevel)]/* [@isDoc][not(name()='Article')][not(umbracoNaviHide=1)]" -->
            <xsl:with-param name="childNodes" select="$currentPage/ancestor::root/*[@isDoc][@level=($StartLevel)]/* [@isDoc][not(name()='Article')][not(umbracoNaviHide=1)]" />
            
            
          </xsl:call-template>                        
      </xsl:template>

      <xsl:template name="Navigation">
        <xsl:param name="childNodes"/>
        <xsl:choose>
        <xsl:when test="count($childNodes) > 0">
          <ul>
            <xsl:if test="$CssId !=''">
              <xsl:attribute name="id">
                <xsl:value-of select="$CssId" />
              </xsl:attribute>
            </xsl:if>
            <xsl:if test="$CssClassName !=''">
              <xsl:attribute name="class">
                <xsl:value-of select="$CssClassName" />
              </xsl:attribute>
            </xsl:if>

            <xsl:for-each select="$childNodes">
              <xsl:call-template name="SubMenu"/>
            </xsl:for-each>
          </ul>
        </xsl:when>
          <xsl:otherwise>
            &nbsp;
          </xsl:otherwise>
        </xsl:choose>
      </xsl:template>


      <xsl:template name="SubMenu">
        <xsl:if test="(umbraco.library:IsProtected(current()/@id, current()/@path) = false() or (umbraco.library:HasAccess(current()/@id, current()/@path) = true() ))">
          <li>
            <xsl:attribute name="class">

              <xsl:if test="$currentPage/ancestor-or-self::*[@isDoc]/@id = current()/@id">
                <xsl:text>selected </xsl:text>
              </xsl:if>

              <xsl:if test="position() = 1">
                <xsl:text>first </xsl:text>
              </xsl:if>

              <xsl:if test="position() = last()">
                <xsl:text>last</xsl:text>
              </xsl:if>
            </xsl:attribute>
            <xsl:choose>
              <xsl:when test="string-length(data[@alias='RedirectUrl']) > 0">
                <href="{data[@alias='RedirectUrl']}" title="{@nodeName}">
                  <xsl:value-of select="@nodeName"/>
                </a>
              </xsl:when>
              <xsl:when test="string-length(data[@alias='RedirectPageId']) > 0">
                <href="{umbraco.library:NiceUrl(data[@alias='RedirectPageId'])}" title="{@nodeName}">
                  <xsl:value-of select="@nodeName"/>
                </a>
              </xsl:when>
              <xsl:otherwise>
                <href="{umbraco.library:NiceUrl(@id)}" title="{@nodeName}">
                  <xsl:value-of select="@nodeName"/>
                </a>
              </xsl:otherwise>
            </xsl:choose>


            <xsl:if test="current()/@level &lt; ($StopLevel) and $currentPage/ancestor-or-self::*[@isDoc]/@id = current()/@id">
              <xsl:if test="count(*[@isDoc][not(data[@alias='umbracoNaviHide']=1)]) > 0">
                <ul>
                  <xsl:for-each select="*[@isDoc][not(data[@alias='umbracoNaviHide']=1)]">
                    <xsl:sort select="@sortOrder" data-type="number" />
                    <xsl:call-template name="SubMenu"/>
                  </xsl:for-each>
                </ul>
              </xsl:if>
            </xsl:if>

          </li>
        </xsl:if>
      </xsl:template>
    </xsl:stylesheet>

     

  • Raphael Taranto 20 posts 40 karma points
    Apr 23, 2012 @ 15:58
    Raphael Taranto
    0

    And here for the slideshow:

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp "&#x00A0;"> ]>
    <xsl:stylesheet 
      version="1.0" 
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
      xmlns:msxml="urn:schemas-microsoft-com:xslt"
      xmlns:umbraco.library="urn:umbraco.library" xmlns:Exslt.ExsltCommon="urn:Exslt.ExsltCommon" xmlns:Exslt.ExsltDatesAndTimes="urn:Exslt.ExsltDatesAndTimes" xmlns:Exslt.ExsltMath="urn:Exslt.ExsltMath" xmlns:Exslt.ExsltRegularExpressions="urn:Exslt.ExsltRegularExpressions" xmlns:Exslt.ExsltStrings="urn:Exslt.ExsltStrings" xmlns:Exslt.ExsltSets="urn:Exslt.ExsltSets" 
      exclude-result-prefixes="msxml umbraco.library Exslt.ExsltCommon Exslt.ExsltDatesAndTimes Exslt.ExsltMath Exslt.ExsltRegularExpressions Exslt.ExsltStrings Exslt.ExsltSets ">


    <xsl:output method="xml" omit-xml-declaration="yes"/>

    <xsl:param name="currentPage"/>
      <xsl:template match="/">

        <xsl:variable name="nodeIds" select="umbraco.library:Split($currentPage/slideshow,',')" />

        <div id="slideshow">
          <ul>
            <xsl:for-each select="$nodeIds/value">
              <li class="rotating-panel fc">
                <xsl:if test="position() > 1">
                  <xsl:attribute name="style">display:none;</xsl:attribute>
                </xsl:if>
                <xsl:variable name="slide" select="umbraco.library:GetXmlNodeById(current()/.)"/>
                <img class="fl" alt="{$slide/@nodeName}" src="{$slide/mainImage}"/>
                <div class="">
                  <xsl:value-of select="$slide/bodyText" disable-output-escaping="yes"/>
                </div>
              </li>
            </xsl:for-each>
          </ul>
          <ul id="slidePager">
            <xsl:for-each select="$nodeIds/value">
              <li>
                <href="?position={position()}">
                  <xsl:if test="position() = 1">
                    <xsl:attribute name="class">selected</xsl:attribute>
                  </xsl:if>
                  <xsl:value-of select="position()"/>
                </a>
              </li>
            </xsl:for-each>
          </ul>

        </div>

      </xsl:template>

    </xsl:stylesheet>

  • Raphael Taranto 20 posts 40 karma points
    Apr 23, 2012 @ 16:01
    Raphael Taranto
    0

    Thanks in advance! :)

  • Peter Nielsen 159 posts 257 karma points
    Apr 23, 2012 @ 16:01
    Peter Nielsen
    0

    Which nodes are the hostnames configured to?

    Top node?

  • Raphael Taranto 20 posts 40 karma points
    Apr 23, 2012 @ 16:13
    Raphael Taranto
    0

    The Dexo and the Dexxo as following:

    Just adding more info, I'm accessing admin area from www.dexo.com.br .

    I'm not sure if the problem is with manage hostnames feature, i think this project supose to understand the nodes bellow each homepage defined...

    Probably its something in XSLT that takes only the first homepage node... (but i couldn't identify what...)

    Not saying something against your thoughts, just adding information... :)

    regards,

    Raphael

  • Raphael Taranto 20 posts 40 karma points
    Apr 23, 2012 @ 16:19
    Raphael Taranto
    0

    As the number of sites will increase, I intent not to create a separate structure for each one...

    I mean structure as template, doc type, macro, xslt...

    I would like to make the administration as simple as it could be, but so far I'm not sure if i'm dreaming to high...

  • Peter Nielsen 159 posts 257 karma points
    Apr 23, 2012 @ 16:50
    Peter Nielsen
    0

    And the Navigation tab inside Umbraco is getting the same result as the xslt I can see. Really strange.

    If you go to Dexo > Initial > Properties and click on the direct link. Which page do you get? Maybe try creating a macro and post of $currentPage/@id to see if its the right page you are on.

    Then we can do some troubleshooting :-)

  • Peter Nielsen 159 posts 257 karma points
    Apr 23, 2012 @ 16:59
    Peter Nielsen
    0

    [Sorry... Double post]

  • Raphael Taranto 20 posts 40 karma points
    Apr 23, 2012 @ 17:14
    Raphael Taranto
    0

    For the first one : "/"

    For the second one: "/dexo.aspx"

    It's a very strange behaviour not considering the correct nodes...

  • Raphael Taranto 20 posts 40 karma points
    Apr 23, 2012 @ 18:25
    Raphael Taranto
    0

    Well, I've just found the problem...

    My primaryNavigation is associated to a Data Type named as Page Picker.

    The problem is that the Page Picker data type is an Ultimate Picker Render Control.

    And it only allows me to set one Parent Node Id per data type.

    For that reason I will need to create the complete structure fore every site I add...

    I mean, create data type, document type and (for sure) template (once they have competly diferent layouts).

    Does anyone know how could I create a single data type setting the parentNode Id as a paremeter, os I don't need to create new data types and document types for every new site, just setting new templates?

    thanks in advance,

    raphael

  • Raphael Taranto 20 posts 40 karma points
    Apr 24, 2012 @ 14:07
    Raphael Taranto
    0

    Hi guys,

    Once solved the problem regarding the selection of the node, now I have a new issue: to present the correct node.

    I can only use the navigation from the first site. from the second site ahead it do not show the navigation in the website, for the final user...

    By the xslt presented could someone help me how to solve this problem?

    You can see here: http://www.dexxo.com.br/  (initial site)

    second site: http://www.mindix.com.br/

    both have their respective menu select in content tab.

    thanks in advance!

    rapha

     

     

     

  • Raphael Taranto 20 posts 40 karma points
    Apr 24, 2012 @ 14:12
    Raphael Taranto
    0

    In additonal, here follows the screen from content tab.

     

     

  • Raphael Taranto 20 posts 40 karma points
    Apr 27, 2012 @ 05:11
    Raphael Taranto
    0

    Ok, that was really the solution, I created a new data type to change the initial node for content picker.

    And its necessary to create new ones for each new site.

    Thanks for Peter and Jeroen the only ones who ever tried to help me in this forum.

    You know, as umbraco is a very friendly interface, there are lots of non .net programers that uses it and sometimes we just need minor help or simple samples to go ahead.

    And there's a great chance that someone, who don't look for .net regarding it's limitations, to suggest great new functionalities.

    Sorry by the speach...

    and thanks again for you two.

    best regards,

    Rapha

Please Sign in or register to post replies

Write your reply to:

Draft