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?
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.
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.
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.
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.
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.
Code
Post Reply
Delete Post
You are allowed to delete your post for 5 minutes after it's posted.
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.