Changing the page type for discussion board

Permalink
The discussion board seems to take on the style of "Secondary Page" from my theme. I would like to change that to one of my custom page types. Is there a way to do that?
View Replies:
GregJoyce replied on at Permalink Reply
GregJoyce
Hi Scott,
The page types included in the the package will get wrapped by your theme's view.php by default. So, if you would like to have more control over the design of these pages, you can copy the discussion.php and discussion_post.php from the packages/discussion/page_types/ folder into your theme.

However, if you compare these files to something like your theme's default.php, you will see that they don't have anything about headers or footers. So in addition to whatever other pieces you want to add, you will also have to add the header and footer. Otherwise these pages will be broken because they are no longer being wrapped in the view.php of your theme.
scottspinola replied on at Permalink Reply
Thanks Greg. Maybe I asked the wrong question or I don't understand your answer.

The current Discussions page style looks like this example with the left vertical nav banner (page type = "Secondary Page (Plain)"):
http://www.21technologies.com/products-services/lynxeon/lynxeon-pla...

I want it to look like this example without the left vertical nav banner (page type = "Full"):
http://www.21technologies.com/about-us/legal-statement/...

How do I accomplish that? Since the Discussion board seemed to pick up the style of an existing page type in my theme, I thought perhaps there was some kind of style reference I could change in some file to make it look like another page.
GregJoyce replied on at Permalink Reply
GregJoyce
The way the Discussion and Discussion Post pages work is that they are included in the add on in the page_types/ folder. These are going to take on the look of whatever is defined in your theme's view.php file. There is really no way to "switch" a page type without modifying its code.


I am guessing that your theme probably has a view.php and a secondary.php that are identical. I think if you got in touch with the theme developer they would be able to tell you how to make view.php more like full.php.


As a guess, full.php probably has something like,
<?php
   $a = new Area('Main');
   $a->display($c);
?>

In addition to the rest of the page's layout.

And your theme's view.php probably has:
<?php 
   print $innerContent;      
?>

and more layout than the full.php. If you were to make full.php and view.php identical except for those two areas, your discussion pages would look the same as your Full pages.

But if you are uncertain about modifying these files you should definitely check with your theme developer.
scottspinola replied on at Permalink Reply
Wouldn't changing view.php and full.php change more than just the discussions pages?
GregJoyce replied on at Permalink Reply
GregJoyce
well changing the view.php would change every page that is not assigned a specific type, like Single Pages and other pages that do not have a page type that is already in your theme. You would not actually be changing the full page type. You would copy full.php to something like full_view.php, make your edits then move view.php to something like view_old.php or view.php.old and rename full_view.php to view.php and then your single pages and discussions would look different.

Alternatively, you could make two copies your theme's full.php named discussion.php and discussion_post.php in your theme's folder. Then replace the "Area"-related code in the copied pages with a copy the contents of the discussion page types. Then you would have page types defined in your theme specifically for the Discussion add-on.