This bit here was outside the for statment. @Page won't get you anything. If your trying to get a property of a node your interating, IE print the bodyText for each link the sample above will do that.
If there is a single page you want to get the text from, you need some way to identify/load it, IE:
@Model.AncestorOrSelf(1).DescendantsOrSelf("Solutions").First().bodyText or @Model.NodeById(144).bodyText
Note thouth that the second method will have problems if you are using Courier to deploy the content.
Hey Jeremy...sorry I took so long to get back, thanks for your post, all working now. You were right i wanted content from a single page so i went for.
Pull bodyText content from page by Document Type
Still getting to grips with Razor...I want to display the copy from my solutions page on the home page, I have a structure like this.
Home
--------Solutions
---------------------Solution
The following code is giving me the list of children from the Solutions node but NOT the bodyText.
This bit here was outside the for statment. @Page won't get you anything. If your trying to get a property of a node your interating, IE print the bodyText for each link the sample above will do that.
If there is a single page you want to get the text from, you need some way to identify/load it, IE:
Note thouth that the second method will have problems if you are using Courier to deploy the content.
Hey Jeremy...sorry I took so long to get back, thanks for your post, all working now. You were right i wanted content from a single page so i went for.
Regards,
S
is working on a reply...