I'm very new to umbraco so excuse my poor description. I hope this makes sense. I'm building a site where the navigation bar takes you to 3 different parts of the company (all branded differently).
Pages are set up like this:
Group Home
Company 1 - Page 1 - Page 2 - etc
Company 2
- Page 1
- Page 2
- etc
Company 3
- Page 1
- Page 2
- etc
Company 1 (and sub pages) have the Company 1 logo at the top of the page. Company 2 (and sub pages) have the Company 2 logo at the top of the page. Company 3 (and sub pages) have the Company 3 logo at the top of the page.
In each case this logo is a link which should lead you back to that specific company homepage.
In my master page I have included the following macro:
If I'm on Group Home, Company 1, Company 2 or Company 3 then the logo link takes me to the right page (essentially just refreshing the page).
But when I'm on any of the Company sub pages the logo link doesn't take me back to the Company main page. It just loads the same page.
I've gotten as far as I have with a fair bit of help already. My knowledge is limited but I was expecting @Model.Ancestor to basically go back up the tree to the top most level. Meaning that whichever part of the site I was in, I could easily access the company home page by clicking the logo.
Can anyone give me any pointers or suggestions as to what I should look into to solve this problem?
Little issue with @Model.Ancestor (razor)
Hi there
I'm very new to umbraco so excuse my poor description. I hope this makes sense. I'm building a site where the navigation bar takes you to 3 different parts of the company (all branded differently).
Pages are set up like this:
- Page 1
- Page 2
- etc
- Page 1
- Page 2
- etc
- Page 1
- Page 2
- etc
Company 1 (and sub pages) have the Company 1 logo at the top of the page.
Company 2 (and sub pages) have the Company 2 logo at the top of the page.
Company 3 (and sub pages) have the Company 3 logo at the top of the page.
In each case this logo is a link which should lead you back to that specific company homepage.
In my master page I have included the following macro:
My razor scripting file has the following code:
The Problem
If I'm on Group Home, Company 1, Company 2 or Company 3 then the logo link takes me to the right page (essentially just refreshing the page).
But when I'm on any of the Company sub pages the logo link doesn't take me back to the Company main page. It just loads the same page.
I've gotten as far as I have with a fair bit of help already. My knowledge is limited but I was expecting @Model.Ancestor to basically go back up the tree to the top most level. Meaning that whichever part of the site I was in, I could easily access the company home page by clicking the logo.
Can anyone give me any pointers or suggestions as to what I should look into to solve this problem?
Wehey! I solved it (don't know how but it works)
is working on a reply...