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
Hi
How do I change this bit of code so I can grab it from diffrent templates?
@if(Model.HasValue("_overskriftCol1")){ <div class="cntEmployeeBlack"> <div class="employeeBlack Center-Light"> <div class="col col1"> <h2 class="Center-Medium">@Model._overskriftCol1</h2> <div> @Model._tekstCol1 </div> </div> <div class="col col2"> <h2 class="Center-Medium"> @if(Model.HasValue("_overskriftCol2")){ @Model._overskriftCol2 } </h2> <div> @Model._tekstCol2 </div> </div> </div> </div>}
/Kate
Hi Kate,
So if I understand your right you want to display some information form a node on other places on your website.
Then you could use:
var content = Library.NodeById(id of the node where you want the data from);<p>@content.propertyAlias</p>
Or if you donĀ“t want to hardcode the id, you could do it by document type alias like this:
var root = Model.AncestorOrSelf(); var content= root.Descendants("Name on your documenttype").First();<p>@content.propertyAlias</p>
/Dennis
Hi Dennis
Thanks
Just what i need :-)
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Content on more than one page
Hi
How do I change this bit of code so I can grab it from diffrent templates?
/Kate
Hi Kate,
So if I understand your right you want to display some information form a node on other places on your website.
Then you could use:
Or if you donĀ“t want to hardcode the id, you could do it by document type alias like this:
/Dennis
Hi Dennis
Thanks
Just what i need :-)
/Kate
is working on a reply...