Jump to content

How do I add an additional block area?


snugRugBug

Recommended Posts

Posted

Hi,

I would like to add an additional block area that will be above my site's content area, and stay full width regardless of whether or not there is a sidebar. Could someone please explain to me how the block area system works? I've tried copying the template tag 

{template="widgetContainer" group="global" app="core" params="'header', 'horizontal'"}

and putting it in the desired position. After that did not work, I tried changing the first parameter to 'fulltop', still no avail.

If anybody has helpful info, I would greatly appreciate it.

Regards

Posted

Anyone?

I believe can't be done because as soon the sidebar comes in it will reduce to add sidebar can ask what block for because maybe another item could do.

Posted

I believe can't be done because as soon the sidebar comes in it will reduce to add sidebar can ask what block for because maybe another item could do.

Adding the block area does not affect the layout and responsiveness too badly, as my included screenshot should show. I could easily improve matters with a little CSS tinkering. I believe the problem lies with how the database remembers which blocks you placed where.

I just want a full width block area above the page content. I'm looking at the template hooks as an alternative, but I really feel like this should be easier.

AFAIK there are 3 types of block areas: header, footer and sidebar. Each page may only contain one of each. The problem is that I can't figure out how to add a new type of block area. If someone could point me to where these types are defined (and how it works), I should be able figure out a good way to extend the functionality to my liking. 

ipbss.PNG

Posted

The system is currently not set up in a way where you are supposed to freely add and arrange new block areas. 

What are you trying to achieve anyway? If you want to add something to the header you don’t necessarily need a block area there first. 

Posted

The system is currently not set up in a way where you are supposed to freely add and arrange new block areas. 

It should be. There's a lot of things that could be done by allowing block areas to be placed freely.

For example, making a customized theme that doesn't use the standard IPS layout, which has more block areas, or two sidebars, or a spot for a big header slider widget or whatnot.

Posted
I ask myself the same question for example add a sidearleft

to my homepage I need 1sidebar verttical in  left articles  in the middle and a right sidebar after i sue page builder for add block but i don't have left sidebar
 
on the old version I was using just this code
<div>
<div class="ipsLayout ipsLayout_withleft ipsLayout_withright ipsLayout_largeright">
<div class="ipsLayout_left">{block="articles_menu"} {block="portal_recent_articles"}</div>
<div class="ipsLayout_content"></div>
<div class="ipsLayout_right">{block="ts3_viewer"} {block="coalition"}</div>
</div>
page builder use template with sidebarright
Posted

Adding the block area does not affect the layout and responsiveness too badly, as my included screenshot should show. I could easily improve matters with a little CSS tinkering. I believe the problem lies with how the database remembers which blocks you placed where.

I just want a full width block area above the page content. I'm looking at the template hooks as an alternative, but I really feel like this should be easier.

AFAIK there are 3 types of block areas: header, footer and sidebar. Each page may only contain one of each. The problem is that I can't figure out how to add a new type of block area. If someone could point me to where these types are defined (and how it works), I should be able figure out a good way to extend the functionality to my liking. 

ipbss.PNG

The system is currently not set up in a way where you are supposed to freely add and arrange new block areas. 

What are you trying to achieve anyway? If you want to add something to the header you don’t necessarily need a block area there first. 

My screenshot shows what I'm trying to achieve. I want a block area at the top of my content that stays full width, regardless of whats going on in the other block areas. Right now the most viable alternative seems to be using template hooks to add modifications to that area.

Will this kind of customization be available in the future, or is this against the vision for IPB 4?

Posted

My screenshot shows what I'm trying to achieve.

Sure, I got that. My question was rather: why does it have to use the block area function? The drag&drop functionality is aimed at regular users who are unable to write code to customize their sites. If you can do this, you don’t really need those block areas. You can just edit templates or hook into them. 

Posted

Sure, I got that. My question was rather: why does it have to use the block area function? The drag&drop functionality is aimed at regular users who are unable to write code to customize their sites. If you can do this, you don’t really need those block areas. You can just edit templates or hook into them. 

That's fine, I guess.

Being able to place extra block areas just seemed like a handy thing to be able to do. And from how it looked in the code, it seemed that I would only need to change the first parameter, and then add a reference to that change in the DB/theme files. I basically thought I was dealing with a key/value system of sorts. My only problem is that I can't find that second place where I need to refer to the change I made. But if you say it is not a viable idea, I'll take your word for it.

I'm still in the process of learning how everything works in general, which is difficult with the current lack of documentation/examples, so any help/information is greatly appreciated :smile:.

Posted

it's possible to add sidebar left in global template but it's two sidebar left or right in forum and pages i search one in forum and two for portal

Posted

Sure, I got that. My question was rather: why does it have to use the block area function? The drag&drop functionality is aimed at regular users who are unable to write code to customize their sites. If you can do this, you don’t really need those block areas. You can just edit templates or hook into them. 

Theme authors. We can make a complex theme with all kinds of nice areas and allow our users to place stock or custom blocks in them.

Posted

Writing code is not a viable solution, since I have the need to hot-swap (change quickly) some blocks in that area and changing the code every time would be absurd.

e.g. I usually have a carousel for the news but on some occasions I would like to put a twitch stream or a youtube video in its place.

  • 3 weeks later...

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...