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
I have a page with a template showing data from my server. In this same page I also have som static text which is edited in the Umbraco Backoffice content field.
How can I get Umbraco so show the "content" text on top BEFORE the template data?
Hi Simon
Can you show code how you render the page?
@using KASI.Mainsite.Website.Models.Customers @model KASI.Mainsite.Website.Models.ViewModels.CustomerAccountPageViewModel @{ Layout = "Master.cshtml"; }
<dt class="stamdata-term">Survey dato:</dt> <dd> @foreach (var surveyData in Model.Stamdata.SurveyDatas.Take(1)) { if (surveyData.Estim_Ugenummer > 0) { <span>Uge:@surveyData.Estim_Ugenummer</span> <span>År:@surveyData.Estim_Aar</span> } else { <span>@surveyData.Estim_EksternSurvey.ToString("D")</span> } } </dd> }
This is the code for the template.
Simon, do you want to show content before "Kliniknavn:"??
yes
Did you solve the issue?
I would like to help you if not
Thanks
Alex
Hi Simon,
Is it Umbraco page where you are using this code?
Can you add
@inherits Umbraco.Web.Mvc.UmbracoViewPage
And then render content with this code:
@Html.Raw(Umbraco.AssignedContentItem.GetPropertyValue("bodyText"))
Where "bodyText" is alias of your content field.
Thanks,
Did you find a way to do it?
Hi Alex, thanks for your answer. I will try your solution tomorrow.
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Show Content before template-data
Hi
I have a page with a template showing data from my server. In this same page I also have som static text which is edited in the Umbraco Backoffice content field.
How can I get Umbraco so show the "content" text on top BEFORE the template data?
Hi Simon
Can you show code how you render the page?
This is the code for the template.
Simon, do you want to show content before "Kliniknavn:"??
yes
Hi Simon
Did you solve the issue?
I would like to help you if not
Thanks
Alex
Hi Simon,
Is it Umbraco page where you are using this code?
Can you add
And then render content with this code:
Where "bodyText" is alias of your content field.
Thanks,
Alex
Hi Simon,
Did you find a way to do it?
Thanks,
Alex
Hi Alex, thanks for your answer. I will try your solution tomorrow.
is working on a reply...