Jun 16, 2011 at 5:03 PM
Edited Jun 16, 2011 at 5:04 PM
Thanks for the help.
What I've started to do with Orchard is customize the theme to get the same look/layout of my original MVC3 site.
I've implemented a footer (Footer.cshtml) in the /Views folder of my theme by using the Designer Tools (selecting an Alternate).
In the footer, I have an informational area that will be consistent throughout the site (it is above the standard footer code with links/etc.).
In this information area I have, for example, a partial with the headline "Why Choose Us?". Within that partial I have just basic text; however, I want the text to render differently for each of the different services I provide, depending on which "Service"
the user is viewing on the browser.
In essence, for Service # 1 (which, going on my original post, used Controller1 in my old MVC3 site) it says "Our Service #1 Solutions are . . . ." Some of the text thereafter is also unique to Service #1.
Service #1 is a link on my main navigational bar, which is also consistent throughout the site. I also had all my Service #1 pages in its own folder as was the convention with Controllers. There are multiple pages in the Service #1 folder. Basically,
when the user is on any one of those Service #1 pages, they saw the text in the information panel that was specific to Service #1.
Whenever a user goes to a Service #2 page (which also has its own folder/controller/set of multiple pages), I wanted that "Why Choose Us?" partial to just display alternate text specific to Service# 2, so it says "Our Service #2 Solutions are...." with additional
text thereafter which is unique to Service #2.
I also have default text for that "Why Choose Us?" partial, which is just generic for the standard website pages (Home Page, Contact Us, About, Disclaimer, etc.).
So, my original logic that I am trying to implement is something like this:
If its a "Service #1" page > show "Service #1" text;
Else if its a "Service #2" page > show "Service #2" text;
Else > show default text.
My incorrect implementation was just my quick fix because I originally ported everything over from .aspx pages I previously had (Web Forms) for the site. Back then I had this logic implemented in a code-behind.
I hope that's clearer and that I haven't made it more convoluted.