Copied to clipboard

Flag this post as spam?

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


  • Anders 27 posts 47 karma points
    Aug 26, 2009 @ 17:29
    Anders
    0

    Use " in umbraco content field

    Hello,

    When im using this it's give a error: <meta name="title" content="<umbraco:Item field="Titel" runat="server"></umbraco:Item>" />

    But if im using ' instand of " it works. But thats gives a error in the w3 validator.. How could i fix that?

    Regards Anders

  • dandrayne 1138 posts 2262 karma points
    Aug 26, 2009 @ 17:42
    dandrayne
    0
    <meta name="title" content="<umbraco:Item field='Titel' runat='server'></umbraco:Item>" />

    Try that.  It should also validate, as it will come out as

    <meta name="title" content="Your content" />
  • Anders 27 posts 47 karma points
    Aug 26, 2009 @ 18:09
    Anders
    0

    Thank you! That worked. I have two other questions. number 1 is: How can i check about the current page is f.ex. 1060, i mean something like: IF @pageID ="1060" {class="selected"}

    Question number two is: How can i make a sitemap?

     

    Regards anders

  • dandrayne 1138 posts 2262 karma points
    Aug 26, 2009 @ 18:23
    dandrayne
    0
    <div>
    <xsl:if test="$currentPage/@id = 1060">
    <xsl:attribute name="class">selected</xsl:attribute>
    </xsl:if>
    </div>

    you may have to stick single quotes around the "1060", but the above code should work.

    Why do you want to hard-code 1060 in though?  There may be a 'nicer' way of doing it.

     

     

  • Anders 27 posts 47 karma points
    Aug 26, 2009 @ 19:36
    Anders
    0

    I want it because i have a menu where there are several pages, and then i wan't to show the user where he/she is. To use xslt you need to create a new file, and then there would be a lot of xslt files.

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Aug 26, 2009 @ 20:07
    Dirk De Grave
    0

    Hi Anders,

     

    Creating a sitemap is as simple as selecting the 'example sitemap xslt' that's available when creating a new xslt file. It should get you started. If you're still having questions on how to show the current page user is on, let us know.

     

    Cheers,

    /Dirk

Please Sign in or register to post replies

Write your reply to:

Draft