Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I think I may have answered my own question (and forgive me if my terminology is not right).I'm using:
The steps to recreate my problem are as follows:
The problem was that the button didn't work if the maincontent field was output via the umbraco:macro (note that it was displayed).It did work if the if I output the field containing the maincontent as an umbraco page field, or with .net logic to check the language.It also worked if I put the macro directly into the template.My question is why won't the button work in the umbraco:macro code which gets the maincontent field?Is it something to do with postback, page events, and razor doing things differently?The code is:
<%@ Master Language="C#" MasterPageFile="~/masterpages/MasterTemplate.master" AutoEventWireup="false" %><asp:Content ContentPlaceHolderID="ContentPlaceHolderMain" runat="server"> <h2><umbraco:Macro runat="server" language="cshtml">@((Session["lang"].ToString() == "cy") ? @Model.pagetitle_cy : @Model.pagetitle)</umbraco:Macro></h2> <!-- This works --> <umbraco:Item field="maincontent" runat="server" /> <!-- This works --> <% if (Session["lang"].ToString() == "cy") { %> <span> <p>Welsh</p> <umbraco:Item field="maincontent_cy" runat="server" /> </span> <% } %> <% else { %> <span> <p>English</p> <umbraco:Item field="maincontent" runat="server" /> </span> <% } %> <!-- This works --> <umbraco:Macro Alias="nptImport" runat="server"></umbraco:Macro> <!-- This doesn't work --> <umbraco:Macro runat="server" language="cshtml"> @((Session["lang"].ToString() == "cy") ? @Model.maincontent_cy : @Model.maincontent) </umbraco:Macro></asp:Content>
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
button not working in usercontrol
I think I may have answered my own question (and forgive me if my terminology is not right).
I'm using:
The steps to recreate my problem are as follows:
The problem was that the button didn't work if the maincontent field was output via the umbraco:macro (note that it was displayed).
It did work if the if I output the field containing the maincontent as an umbraco page field, or with .net logic to check the language.
It also worked if I put the macro directly into the template.
My question is why won't the button work in the umbraco:macro code which gets the maincontent field?
Is it something to do with postback, page events, and razor doing things differently?
The code is:
is working on a reply...