Hello, what I have seen here, the majority are highly trained and can resolve this issue without great difficulty.
The pluggins wrapper allows hide sidebar.
But the template bulletproff regarded as occupied space. What can I do to make the site occupies the entire embedded space freed by the sidebar?
Sorry, I translated from Spanish using Google.
The embedded page is not centered.
Thank you.
hide sidebar and wrapper
-
- Regular
- Posts: 3652
- Joined: Mon Feb 13, 2006 2:40 am
- Location: Chicago, IL, USA
- Contact:
Re: hide sidebar and wrapper
When enable "hide sidebar" in serendipity_event_wrapURL.
Is it possible?
Is it possible?
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: hide sidebar and wrapper
Hi!
Hm, I believe that's not so easy. The "hide sidebar" option of wrapurl actually only removes all elements inside the wrapping <div> container. But the <div> container is still there (it can't really be removed, because its output is not dynamic).
In past templates this worked because the containers were table <td>s, and if they had no contents, they would shrink to zero size.
Bulletproof seems to check $leftSidebarElements etc. a tad to late, within the <div>. I believe if that IF were moved BEFORE the output of <div>, that the output would be proper. I think the wrapurl plugin should set those two variables to 0.
Regards,
Garvin
Hm, I believe that's not so easy. The "hide sidebar" option of wrapurl actually only removes all elements inside the wrapping <div> container. But the <div> container is still there (it can't really be removed, because its output is not dynamic).
In past templates this worked because the containers were table <td>s, and if they had no contents, they would shrink to zero size.
Bulletproof seems to check $leftSidebarElements etc. a tad to late, within the <div>. I believe if that IF were moved BEFORE the output of <div>, that the output would be proper. I think the wrapurl plugin should set those two variables to 0.
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
-
- Regular
- Posts: 3652
- Joined: Mon Feb 13, 2006 2:40 am
- Location: Chicago, IL, USA
- Contact:
Re: hide sidebar and wrapper
I think it is going to be more complicated than what Garvin described. Bulletproof sets classes for the sidebars and content area based on the template configuration (left sidebar, right sidebar, both sidebars, etc). Those classes determine the width of the sidebars and content area. Additionally, bulletproof also has the ability to place navigation in the sidebars, so a sidebar container is still required under that circumstance even if there are no other sidebar items to display.
It COULD be done by changing the logic so that the <div> classes are determined by what actually needs to be emitted, and not just by the sidebar template option.
For what it is worth, my Kinetic template has static pages with the option to suppress all sidebars. I believe the wrapURL plugin merely emits content in an iframe, so you could use a static page and add your own iframe code to contain the external web page.
It COULD be done by changing the logic so that the <div> classes are determined by what actually needs to be emitted, and not just by the sidebar template option.
For what it is worth, my Kinetic template has static pages with the option to suppress all sidebars. I believe the wrapURL plugin merely emits content in an iframe, so you could use a static page and add your own iframe code to contain the external web page.
=Don=
Re: hide sidebar and wrapper
Thanks, has been a great help.
I added this code in the file serendipity_event_wrapper
And changed index.tpl
and works.
Thank you!
I added this code in the file serendipity_event_wrapper
Code: Select all
$serendipity['smarty']->assign('oculta_sidebar', $this->get_config('hide_sidebar'));
Code: Select all
{if $template_option.layouttype == '2sb'}
<!-- case 4: 2 columns, left sidebar only -->
{if !$oculta_sidebar}
<div id="serendipityLeftSideBar" class="twoside layout2sb_left">
.... skip ...
.....
</div>
<div id="content" class="twomain layout2sb_content hfeed">
{$CONTENT}
</div>
{else}
<div id="content" class="onemain layout1col_content hfeed">
{$CONTENT}
</div>
{/if}
{/if}
Thank you!
Last edited by curso4 on Tue May 12, 2009 5:27 pm, edited 1 time in total.
-
- Regular
- Posts: 3652
- Joined: Mon Feb 13, 2006 2:40 am
- Location: Chicago, IL, USA
- Contact:
Re: hide sidebar and wrapper
Well done - and that is similar to how Kinetic handles it on static pages... checks to see if an option to hide sidebars is set, and if so, uses different classes which in turn use different widths for the content area.
=Don=
Re: hide sidebar and wrapper
Thanks Don, I have seen kinetic demo and is a very good.
-
- Regular
- Posts: 3652
- Joined: Mon Feb 13, 2006 2:40 am
- Location: Chicago, IL, USA
- Contact:
Re: hide sidebar and wrapper
Thanks for the compliments on Kinetic, and once again - great job on your site.
=Don=