Because I get a zero value Descendants in Razor with Umb 4.11.5?
Hello friends, look I have this code, which calls for a node and tries to get all descendants called "Car". The problem is that this returning 0 and I do not know why, since I have like 4 cars at nodes descendants. Help please and tried everything and it does not work. : (: (: (
<umbraco:Macro runat="server" language="cshtml"> @{ var t = @Model.NodeById("1091").Descedants("Car").Where("Visible"); foreach(var c in t){ @c.Name } } <umbraco:Macro>
No, I have not set anything "umbracoNaviHide" ... I'm desperate with this that bad for me. My friend, can you give me your email to gmail, to show my website to see if you can spot the problem?. I greatly appreciate. And then you ask the solution here.
The problem has been fixed. Sometimes you are very stressed and can not think straight ... was inadvertently assigning the "Id" wrong and had; "Descedants" instead of "Descendants". My consjeoe s well as to review and write your code as assigned. haha
Because I get a zero value Descendants in Razor with Umb 4.11.5?
Hello friends, look I have this code, which calls for a node and tries to get all descendants called "Car". The problem is that this returning 0 and I do not know why, since I have like 4 cars at nodes descendants. Help please and tried everything and it does not work. : (: (: (
<%@ Master Language="C#" MasterPageFile="~/umbraco/masterpages/default.master" AutoEventWireup="true" %>
<asp:Content ContentPlaceHolderID="ContentPlaceHolderDefault" runat="server">
<umbraco:Macro runat="server" language="cshtml">
@Model.NodeById("1091").Descedants("Car").Where("Visible").Count()
umbraco:Macro>
<asp:ContentPlaceHolder Id="Content" runat="server">
asp:ContentPlaceHolder>
asp:Content>
Try this instead
Thanks for answering. No, it shows absolutely nothing!. :( :(
Opps not Desedants but Descendants
Thanks for answering. No, it shows absolutely nothing!. :( :( Oh my God!
Still nothing ? Weird. Do you have umbracoNaviHide set to true in yout content section ?
No, I have not set anything "umbracoNaviHide" ... I'm desperate with this that bad for me. My friend, can you give me your email to gmail, to show my website to see if you can spot the problem?. I greatly appreciate. And then you ask the solution here.
Drop me an email here [email protected] ill have a look
Right!
Looks like you are using the wrong DocTypeAlias here. You should be using Dealer-Vehiculo instead of Car.
The problem has been fixed. Sometimes you are very stressed and can not think straight ... was inadvertently assigning the "Id" wrong and had; "Descedants" instead of "Descendants". My consjeoe s well as to review and write your code as assigned. haha
Thanks Fuji!
is working on a reply...