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
hii
i have a master page whose doc type is master and template allowed is home , a home page have doc type and template is home.
now i want to access the properties of home doc type on master with razor.plz help
Hi,
If you are using Razor in your Template try this
@{ @Model.propertyAlias}
However can you tell us more about what you are trying to do.
the code for Slider that i want to access in master,which is for home page property imageSlider
i want to use this property in master
@inherits umbraco.MacroEngines.DynamicNodeContext
@{
if (Model.HasValue("imageSlider"))
{
var slider = Library.NodeById(Model.imageSlider);
foreach (var item in @slider.Children)
if(@item.Position() == 0)
<div class="active item">
<a href="@item.link1">
<img src='@item.Media("image1", "umbracoFile")' style="width:828; height:379;" alt="" />
</a>
</div>
}
else
<div class="item">
<a href="@item.link">
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
how to access property of one page into another
hii
i have a master page whose doc type is master and template allowed is home , a home page have doc type and template is home.
now i want to access the properties of home doc type on master with razor.plz help
Hi,
If you are using Razor in your Template try this
However can you tell us more about what you are trying to do.
the code for Slider that i want to access in master,which is for home page property imageSlider
i want to use this property in master
@inherits umbraco.MacroEngines.DynamicNodeContext
@{
if (Model.HasValue("imageSlider"))
{
var slider = Library.NodeById(Model.imageSlider);
foreach (var item in @slider.Children)
{
if(@item.Position() == 0)
{
<div class="active item">
<a href="@item.link1">
<img src='@item.Media("image1", "umbracoFile")' style="width:828; height:379;" alt="" />
</a>
</div>
}
else
{
<div class="item">
<a href="@item.link">
<img src='@item.Media("image1", "umbracoFile")' style="width:828; height:379;" alt="" />
</a>
</div>
}
}
}
}
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.