Tech
Forums
Jobs
Books
Events
Live
Interviews Prep
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
0
Reply
How to get parent site name from subsite using Umbraco
Guruprakash C
Jan 9 2018 2:33 AM
165
Reply
Suggest how to get parent site name from subsite name from another root using umbraco.
For eg.
Home
Overview
About
Assume that from search page i need to get name of the subsite name and parent site name like below:
Subsite1 - Home
Overview - Home
Subsite1 - Parent2
Subsite2 - Parent4
What i have tried:
@
foreach
( var container
in
Model.Content.Children(
"container"
)
{
var containerName = container.HasProperty(
"containerTitle"
) &&
container.HasValue(
"containerTitle"
)? container.GetPropertyValue
(
"containerTitle"
): container.Name;
}
please suggest your logics. Thanks in advance.
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
0
)
Next Recommended Forum
How to use multiple model with model binder-mvc.net
The model item passed into the dictionary is of type