Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+4 votes
1.6k views
in Plugins by

This is quickly made for own use and released for you all.

Hide Sidebar (self explanatory) plugin allows to hide sidebar on Q2A registerd template pages. Simpe to use no too much options just simpley place plugin directory into qa-plugin directory and from admin > options select page you want to hide sidebar.

Plugin will automatically override css to make content full-width.

Note: Plugin tested on Q2A-1.5.3 and Q2A-1.6 Dev version with Snow theme. This is very simple plugin and you can modify css for your theme from layer page.

Download from Q2A Market: http://store.q2amarket.com/store/products/hide-sidebar-plugin/

Download from Github: https://github.com/q2amarket/q2am-hide-sidebar

by
Nice plugin!
by
Glad Sama55..
by
Oh...This is really useful jatin
nice and thank you for sharing :)
by
you are welcome ombr
by
thanks for the plugin, very useful.

1 Answer

0 votes
by
edited by
Thank you jatin. I try plugin. Below is my impression.

1. sidepanel() of qam-sidebar-layer.php [Is it bug?]

In this logic, even if it does not check one with admin panel, is there page in which side bar hides? ex: account etc...

2. "plugin" template type

It is convenient if you can also hide page which plugin makes.

3. Processing by URL pattern matching (Additional function request)

Template type cannot control pages strictly. If URL is used, plugin users can process more strictly. Core function hint: qa_request() / qa_request_part() / qa_get()
by
Sama55,
Thanks to have a look into the plugin. Here is reply to your feedback..

1. sidepanel() is to hide the sidebar as I am not hiding sidebar with css but actually in PHP by hiding sidepanel().

Here I am calling sidebar only if any of condition is true else it won't load sidepanel()

2. Can you please describe in bit details?

3. What I believe is 'template' should be more effective than requesting url. Url user can rewrite but 'template' is built in and can not be changed. So it is always good to use 'template' rather than only getting url.

In addition I have cross checked with qa_request() as it doesn't consider home page but only the url so if my custom home page is 'my-home' than it won't consider it as a qa ( which is default home ) but using 'custom' template it allows to hide for all custom pages.

So technically if you have any value to compare or you already know the value than you may use qa_request() or other but when you don't know what user will set url for custom page than I believe 'custom' template is the alternative and proper way to use.

What do you say?
by
@jatin
1. See your "account" page immediately after installing this plugin.
2. I need ---> $this->template == 'plugin'
3. In my case, the display of side panel needed to be separately controlled by page with same template. My needs may be rare cases. Don't care too much.
by
Oh I see, so here you are talking about admin section for sub pages. Hmm.. I think in that case yeas it may not allows to display on specific sub pages as it will consider entire admin template. I think I can improve this too. But than user will have too much options (checkbox) to use. Rather when they need in admin section they will simply make visible and than hide it. another thing is about custom page which is always user depended so can't assume what will be in the url to use qa_request();

So what do you think is it good to give too much options only for admin pages? However I can add those options if it really worth and usable.

Appreciate your feedback...
...