Copied to clipboard

Flag this post as spam?

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


  • root 5 posts 25 karma points
    Sep 11, 2009 @ 11:40
    root
    0

    Error parsing XSLT file

    Hello everyone.

     

    Also i have a main template called "main" and two child templates called "FrontPage and TextPage".

    In the "main" i have three XMLs-macros. I would make with "TextPage" a Categoryname called "Products" (/products.aspx), so when i go to products.aspx i become

    Error parsing XSLT file: \xslt\GetMovie.xslt
    Error parsing XSLT file: \xslt\GetPictureUrl.xslt
    Error parsing XSLT file: \xslt\GetRSS.xslt
    But i would not these XSLT-macros in products.aspx only in main.aspx!

    Sorry for my bad english ;-).

    Best greetings

  • Len Dierickx 150 posts 92 karma points
    Sep 11, 2009 @ 11:48
    Len Dierickx
    0

    Hi,

    The products.aspx page uses a template "TextPage" that references the template you call "main". This will cause your XSLT macros to run as they are refrenced by the template "main".

    Main ( with 3 xslt macors)

    - TextPage

    - Frontpage

    Any of those templates will run macros on template "Main"

    You should create a new template called "products" and make sure you set the master template to "None", and change the template on the products.aspx page. That way your XSLT macros will not run when calling the products page.

    Main ( with 3 xslt macors)

    - TextPage

    - Frontpage

    Products (no master template set!)

     

    Grt/Len. 

     

  • root 5 posts 25 karma points
    Sep 11, 2009 @ 11:55
    root
    0

    It works thanks, but i need the same style like "main" but  without the macros.

  • Len Dierickx 150 posts 92 karma points
    Sep 11, 2009 @ 12:02
    Len Dierickx
    0

    You can duplicate the main template, without the macros, and use this copy as a master template for products.

    Grt/Len. 

     

  • root 5 posts 25 karma points
    Sep 11, 2009 @ 14:30
    root
    0

    Your answer is good and right but i need a "better" one.

     

    Document Types
    ---------------------

    Main Doc Type (no Template!!!)
    - FrontPage (Template: FrontPage)
    - TextPage (Template: TextPage)

     

    Templates
    --------------

    Main (with 3 xslt macros)
    - FrontPage
    - TextPage

     

    Content
    -----------

    FrontPage (Template: Frontpage / DT: FrontPage)
    - - News              ---> Navigationpoint (i do not know the right word for the textlink in the Navigation) (TextPage as Template)
    - - Products        ---> Navigationpoint (TextPage as Template)
    - - Prefereces     ---> Navigationpoint (TextPage as Template)

    these are news.aspx, products.aspx and preferences.aspx

     

    Here the Navigation xslt:
    .......
    .......

    <ul id="mainnavi">
    <xsl:for-each select="$currentPage/ancestor-or-self::node [@level=$level]/node [string(data [@alias='umbracoNaviHide']) != '1']">
        <li>
            <a href="{umbraco.library:NiceUrl(@id)}">
                <xsl:if test="$currentPage/ancestor-or-self::node/@id = current()/@id">
                    <!-- we're under the item - you can do your own styling here -->
                    <xsl:attribute name="style"></xsl:attribute>
                </xsl:if>
                <xsl:value-of select="@nodeName"/>
            </a>
        </li>
    </xsl:for-each>
    </ul>
    .........
    ..........

     

    I would an another type of style for news, products and preferences but it takes the macros from "main"

    SORRY for my bad english :-(.

Please Sign in or register to post replies

Write your reply to:

Draft