Copied to clipboard

Flag this post as spam?

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


  • ketan italiya 17 posts 59 karma points
    May 08, 2014 @ 12:46
    ketan italiya
    0

    Why css and other scripts are not loading in my submenu item's page in Umbraco-7.1

    I got a superb experience with umbraco-7.1,thanks for that,actually i aqm new in umbraco and try to make a new site using umbraco-7.1

    I use this code for navigation.actually i have this type of navigation..

    home          work              aboutus         contactus

                  submenu1

                  submenu2

                  submenu3

                  submenu4

    here is code for that.

       version="1.0"
    
    
    

    <?xml version="1.0" encoding="UTF-8"?>

    <!DOCTYPE xsl:stylesheet [

      <!ENTITY nbsp "&#x00A0;">

    ]>

    <xsl:stylesheet

      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"/>

      <!-- Input the documenttype you want here -->

      <xsl:variable name="level" select="1"/>

      <xsl:variable name="CurrentNodeLine" select="$currentPage/ancestor-or-self::*"/>

      <xsl:template match="/">

     

     

        <ul class="sf-menu">

          <li>

            <a href="/">

              <xsl:if test="$currentPage/@id = $currentPage/ancestor-or-self::* [@level=$level]/@id">

                <xsl:attribute name="class">current</xsl:attribute>

              </xsl:if>

              Home

            </a>

          </li>

          <xsl:for-each select="$currentPage/ancestor-or-self::* [@level=$level]/* [@isDoc and string(umbracoNaviHide) != '1']">

            <li>

              <a href="{umbraco.library:NiceUrl(@id)}">

                <!--

                <xsl:variable name="MenuID" select="@id"/>

                <xsl:for-each select="$CurrentNodeLine">

                  <xsl:if test="current()/@id=$MenuID">

                    <xsl:attribute name="class">current</xsl:attribute>

                  </xsl:if>

                </xsl:for-each>

                -->

                <xsl:value-of select="@nodeName"/>

                <span>

     

                </span>

              </a>

              <xsl:variable name="level3" select="current()/* [@level=3 and @isDoc and string(umbracoNaviHide) != '1']"></xsl:variable>

              <xsl:if test="count($level3)>0">

                <ul>

                  <xsl:for-each select="$level3">

                    <li>

                      <a href="{umbraco.library:NiceUrl(@id)}">

                        <xsl:value-of select="@nodeName"/>

                        <span>

                        </span>

                      </a>

                      <xsl:variable name="level4" select="current()/* [@level=4 and @isDoc and string(umbracoNaviHide) != '1']"></xsl:variable>

                      <xsl:if test="count($level4)>0">

                        <ul>

                          <xsl:for-each select="$level4">

                            <li>

                              <a href="{umbraco.library:NiceUrl(@id)}">

                                <xsl:value-of select="@nodeName"/>

                                <span>

                                </span>

                              </a>

                              <xsl:variable name="level5" select="current()/* [@level=5 and @isDoc and string(umbracoNaviHide) != '1']"></xsl:variable>

                              <xsl:if test="count($level5)>0">

                                <ul>

                                  <xsl:for-each select="$level5">

                                    <li>

                                      <a href="{umbraco.library:NiceUrl(@id)}">

                                        <xsl:value-of select="@nodeName"/>

                                        <span>

                                        </span>

                                      </a>

                                    </li>

                                  </xsl:for-each>

                                </ul>

                              </xsl:if>

                            </li>

                          </xsl:for-each>

                        </ul>

                      </xsl:if>

                    </li>

                  </xsl:for-each>

                </ul>

              </xsl:if>

            </li>

          </xsl:for-each>

        </ul>

      </xsl:template>

     

    </xsl:stylesheet>

     

     

    so now my problem is that when my mouse cursaor goes on work then dropdown list of submenyu items is shown.here home,contactus,aboutus all pages run well with css and scripts

    but my summenu1,sumbemu2,sumbemu3,sumbemu4,this pages are not run properly with css so what should i do.?

     

     

     

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    May 08, 2014 @ 12:57
    Jan Skovgaard
    0

    Hi Ketan and welcome to our :)

    Could you show what your master template looks like? You should reference your styles and scripts from there.

    /Jan

  • ketan italiya 17 posts 59 karma points
    May 08, 2014 @ 13:07
    ketan italiya
    0

    Thanks for quick reply actually i already reference style and script in each template. Actually i have no any master template. i use different template for each page. Is it okay with this? I have total 8 pages in my website and i use 8 templates. I have no idea can you help me sir.

    Thanks in advance.

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    May 09, 2014 @ 23:23
    Jan Skovgaard
    0

    Hi Ketan

    Ok, do you mind sharing an example of how you reference the styles and scripts?

    Cheers, Jan

  • ketan italiya 17 posts 59 karma points
    May 12, 2014 @ 06:54
    ketan italiya
    0

    Thanks,for your reply Now it will solved.actually i make some mistakes in path of css so i faced this problem,well thanks for your support.

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    May 12, 2014 @ 09:15
    Jan Skovgaard
    0

    Hi Ketan

    Glad to hear you managed to figure out the issue :)

    /Jan

Please Sign in or register to post replies

Write your reply to:

Draft