This project is read-only.

Master page functionality

Topics: Themes
Jan 28, 2014 at 3:39 PM
Hello colleagues!
At the moment I'm trying to integrate BlogEngine and YetAnotherForum, but my question is about master pages. Can somebody suggest how I can implement two different master pages for the current theme - one for the blog and another for the forum (without side panel for widgets). I want to load the first master page if i'm in the blog and automatically switch it when I go to the forum. I'm using razor theme (.cshtml) 'ElegantBlue'. Any samples/suggestions?
Thank you!
Jan 28, 2014 at 6:30 PM
you should contact Dave Burke
he made community site by integrating forum/gallery server pro/ ScrewTurn Wiki.
I think he can help you.
Jan 29, 2014 at 1:28 PM
zealgeeks wrote:
you should contact Dave Burke
he made community site by integrating forum/gallery server pro/ ScrewTurn Wiki.
I think he can help you.
Hi zealgeeks,
Thanks for the suggestion, but I don't think it's a good idea as he has used quite weird way to integrate YAF and BE... besides, my question was about Mater pages.
Jan 29, 2014 at 3:43 PM
Edited Jan 29, 2014 at 3:49 PM
Do you need a different site master for some reason other than hiding the side panel/widgets, if not then you might be able to just hide the side panel when in the forum. Maybe wrap the side panel markup in a conditional, if URL contains forum hide side panel else show. I have neither installed(ElegantBlue or YAF), so it's just an untested suggestion.
Jan 30, 2014 at 8:29 AM
Edited Jan 30, 2014 at 8:35 AM
Hi Allaire,

What you can do is use a "nested" master page.

In that nested master page have two or three place holders.
  1. For YAF Forum
  2. BlogEngine.Net
  3. MainSite?
In the code behind have it set the place holder to visible based on URL rules like this:

If query string contains = MainWebsite/forum ---> PlaceHolder-YAF visible = True

If query string contains = MainWebsite/blog ---> PlaceHolder-BlogEngine.Net visible = True


MainSite-PlaceHolder visible = true

Using a Nested Master page instead of having it switch to a complete different master pages

if query = forum --> Yaf master page
If query = blog --> master page

Having a "nested" master page allows you to have a "global" theme that is applied to your entire website like
your Top menu and footer.

All that changes is the middle part for your Blog or Forum.

For your YAF and master pages if you want a "Global" theme with your nested master page,
you would need to delete the top menu and footers from YAF and or edit them so that when the global header and footer is displayed it is universal across your entire website instead of having 2 or 3 websites with in one.

Have a great day!

Brian Davis
Jan 30, 2014 at 9:34 AM
Hi Brian,

Thank you for the suggestion, I think I'll go ahead with this approach.


Jul 17, 2014 at 6:05 PM
Hi Allaire,

Did you ever get the Master Page integration with Blog Engine and YAF up and running? If so can you post a link to your website so I can check it out, thanks!