I am adding our company logo to our main slider images, and I am wanting to stop the theme-defined logo from appearing on the home page ONLY.
I opened my /Views/Shared/_Root.cshtml and see this variable is defined:
isHomePage = true;
Further down on same view, I see where the Header page is called:
<div class="home-page-header main-slider-header">
But in the Header.cshtml, when I try to reference the "isHomePage" variable:
@* do not show logo *@
<a href="@Url.RouteUrl("HomePage")" class="logo">
string storeName = EngineContext.Current.Resolve<IStoreContext>().CurrentStore.GetLocalized(x => x.Name);
<img title="" alt="@storeName" src="@Url.Content(logoPath)">
....I get this error:
The name 'isHomePage' does not exist in the current context
My question is:
Isn't it possible for a partial view to see the variables defined on it's parent/calling document?
If so, on the Header.cshtml, how can I properly refer to the variable created on _Root.cshtml for my conditional code to execute correctly?