locked
Masterpage HTML and SPUrl RRS feed

  • Question

  • Hi all,

    I'm having problems with Masterpage conversion. I want to have server-relative URLs for my favicon. So, I tried this and put it in my custommaster.html.

    <link rel="shortcut icon" href="<%$SPUrl:~sitecollection/Style%20Library/Custom/LayoutResources/Images/favicon/favicon.ico %>" />

    Problem was, the .master did not get converted. When I check the error, it says Error_20_'<', hexadecimal value 0x3C.

    So I tried another approach:

    <asp:literal runat=”server” Text=”&lt;link rel=’shortcut icon’ href=’” /><asp:literal runat=”server” Text=”<% $SPUrl:~sitecollection/Site%20Assets/favicon.ico %>” /><asp:literal runat=”server” Text=”‘ type=’image/vnd.microsoft.icon’ /&gt;” />

    Also in the HTML masterpage. It did not also create the .master. It says ASP is not available.

    Can anyone help me to try to set the favicon.ico using SPUrl? If I do it in .master, it's no problem. But I want to be able to deploy both the HTML and .master, that is why I'm trying to edit the master. But I don't know how to make it properly convert to .master.

    Thank you!



    • Edited by WATER004 Saturday, November 9, 2013 5:34 PM
    Saturday, November 9, 2013 5:08 PM

Answers

  • Thanks Qiao,

    I used this:

    <!--SPM:<asp:Literal runat="server" Text="&#60;link rel='shortcut icon' href='"/>-->
            <!--SPM:<asp:Literal runat="server" Text="&#60;% $SPUrl:~sitecollection/_catalogs/masterpage/css/images/favicon.ico %&#62;"/>-->
            <!--SPM:<asp:Literal runat="server" Text="' type='image/vnd.microsoft.icon' /&#62;"/>-->

    And it works fine.

    • Marked as answer by Qiao Wei Tuesday, November 19, 2013 5:22 AM
    Thursday, November 14, 2013 3:53 PM

All replies

  • Hi WATER004,

    Would you please try to use &lt; and &gt; replace the ‘<’ and ‘>’ to reference the SPUrl. Check the result.

    If it isn’t the issue, please feel free to let me know.

    Thanks,


    Qiao Wei
    TechNet Community Support

    Thursday, November 14, 2013 9:07 AM
  • Thanks Qiao,

    I used this:

    <!--SPM:<asp:Literal runat="server" Text="&#60;link rel='shortcut icon' href='"/>-->
            <!--SPM:<asp:Literal runat="server" Text="&#60;% $SPUrl:~sitecollection/_catalogs/masterpage/css/images/favicon.ico %&#62;"/>-->
            <!--SPM:<asp:Literal runat="server" Text="' type='image/vnd.microsoft.icon' /&#62;"/>-->

    And it works fine.

    • Marked as answer by Qiao Wei Tuesday, November 19, 2013 5:22 AM
    Thursday, November 14, 2013 3:53 PM