wow, if i'd run this code, there would be multiple asp.net errors... where's your strip function and what is *node*.
If you need to reference the current node from your template, use umbraco.businesslogic.nodeFactory.Node.GetCurrent() and if you need the value for a property, use .GetProperty("alias").Value
How can I redirect a node to a externalUrl?
I created a document type with a field named externalUrl, it's string type, then how can I get externalUrl value in template?
<%@ Master Language="C#" MasterPageFile="~/masterpages/umbMaster.master" AutoEventWireup="true" %>
<asp:Content ContentPlaceHolderID="cp_content" runat="server">
<%if (strip(node.externalUrl.Length>0) {
Response.Redirect(node.externalUrl);
}
%>
</asp:Content>
wow, if i'd run this code, there would be multiple asp.net errors... where's your strip function and what is *node*.
If you need to reference the current node from your template, use umbraco.businesslogic.nodeFactory.Node.GetCurrent() and if you need the value for a property, use .GetProperty("alias").Value
/Dirk
Thank you very much.
is working on a reply...