view.php problem

I could do with having 2 layouts for the view.php but don't think its possible. The reason for this is I would like to keep a left sidebar on most of the pages that utilise it which is fine but it messes up the look of the members area as that already has its own sidebar and really needs a full width template to look OK.

Is there any way round this?

View Replies: View Best Answer
adajad replied on at Permalink Reply
Just create a new file called full_width.php in your themes folder and install the new page_type from 'dashboard > themes'. You can then apply the Full Width page type on selected pages.

You can find excellent information here:
oakleafg replied on at Permalink Reply
Cheers but don't think you can apply page types to areas that use a single page such as the members profile pages, I think they utilise view.php.
adajad replied on at Permalink Reply
That is correct, and I read your post a bit to quick.

You could go the other way around though, having view.php without sidebar and create a Sidebar Page Type for the other pages.
oakleafg replied on at Permalink Reply
Its an awkard one as the view.php with the sidebar works great for the 404 page, login etc its just the members profile pages that look nasty as it introduces its own sidebar with the avatar and members page links.
The only way I can think of doing it is to duplicate my theme folder and effectively have 2 view.php files and change the site theme path links to

$v->setThemeByPath('/page_not_found', "theme1"); (view.php with sidebar)
$v->setThemeByPath('/members', "theme2"); (view.php with no sidebar)

Guess that should work!!!
adajad replied on at Permalink Best Answer Reply
You can solve it by completely overriding the single page as well. You do that by creating your own page with the same name as the single page in question and save it to your themes root directory. You do need to add your own header and footer, but still doable.

Edit: Wohoo! I even found documentation on it (it wasn't only in my head obviously). Have a look here under 'Customizing a Single Page's Appearance'.
oakleafg replied on at Permalink Reply
Great stuff, will give that a go. Thanks.