Copied to clipboard

Flag this post as spam?

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


  • pnr 131 posts 226 karma points
    Nov 12, 2009 @ 13:02
    pnr
    0

    Make no follow in TinyMCE in Umbraco 4

    Isn't it possible to mark a link "no follow" in the version of TinyMCE used in Umbraco 4?

     

    Thanks in advance!

  • dandrayne 1138 posts 2262 karma points
    Nov 12, 2009 @ 14:48
    dandrayne
    0

    Not as far as I know, but you potentially could add a class of "nofollow" using the wysiwyg, then do a umbraco.library:Replace() on the field to swap class="nofollow" with rel="nofollow" before it gets displayed to the user

  • pnr 131 posts 226 karma points
    Nov 13, 2009 @ 09:56
    pnr
    0

    What a brilliant idear!

    But i do have a little problem, hov do i replace " in Umbraco.Libary.Replace()

    I have tried: umbraco.library:Replace({0},'class=\"nofollow\"','rel=\"nofollow\"') And umbraco.library:Replace({0},'class=""nofollow""','rel=""nofollow""')

    But it isn't working,

  • dandrayne 1138 posts 2262 karma points
    Nov 13, 2009 @ 11:19
    dandrayne
    0

    Are you using inline xslt?  I prefer using a straight macro for this kind of thing, but I guess i just love verbosity...

    I've tested this to be working fine (i had trouble with the apostraphes in 'replace' so used xslt variables)

    <?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:template match="/">

    <xsl:variable name="replaceThis">
    <xsl:text>class="nofollow"</xsl:text>
    </xsl:variable>
    <xsl:variable name="replaceWith">
    <xsl:text>rel="nofollow"</xsl:text>
    </xsl:variable>
    <xsl:value-of select="umbraco.library:Replace($currentPage/data[@alias='bodyText'], $replaceThis, $replaceWith)" disable-output-escaping="yes" />

    </xsl:template>

    </xsl:stylesheet>

    Dan


  • pnr 131 posts 226 karma points
    Nov 16, 2009 @ 10:53
    pnr
    0

    Thank you so much!

  • pnr 131 posts 226 karma points
    Nov 16, 2009 @ 13:55
    pnr
    0

     

    <!-- /* Font Definitions */ @font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4; mso-font-charset:1; mso-generic-font-family:roman; mso-font-format:other; mso-font-pitch:variable; mso-font-signature:0 0 0 0 0 0;} @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4; mso-font-charset:0; mso-generic-font-family:swiss; mso-font-pitch:variable; mso-font-signature:-520092929 1073786111 9 0 415 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-unhide:no; mso-style-qformat:yes; mso-style-parent:""; margin-top:0cm; margin-right:0cm; margin-bottom:10.0pt; margin-left:0cm; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi; mso-fareast-language:EN-US;} .MsoChpDefault {mso-style-type:export-only; mso-default-props:yes; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi; mso-fareast-language:EN-US;} .MsoPapDefault {mso-style-type:export-only; margin-bottom:10.0pt; line-height:115%;} @page Section1 {size:595.3pt 841.9pt; margin:3.0cm 2.0cm 3.0cm 2.0cm; mso-header-margin:35.4pt; mso-footer-margin:35.4pt; mso-paper-source:0;} div.Section1 {page:Section1;} -->

    There is one "little" problem, when using the macro a bow, the macro's that is imbedded in the content isn't working.

  • pnr 131 posts 226 karma points
    Nov 16, 2009 @ 13:56
    pnr
    0

    There is one "little" problem, when using the macro a bow, the macro's that is imbedded in the content isn't working.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies