Jump to content

How do I add an additional block area?


snugRugBug
 Share

Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

are asking how create block or place the block ? if the first you need use IN_DEV to create any block few document been created and can be looked at by this link https://community.invisionpower.com/4docs/ if the answer is the second one then again this link will help you www.youtube.com/watch?v=fvRF0ezCo3Q

...he wants to add a new block slot to his theme. 

Link to comment
Share on other sites

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.

Edited by Lukeroge
Link to comment
Share on other sites

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
Edited by ayuki
Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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. 

Link to comment
Share on other sites

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:.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 3 weeks later...
 Share

  • Recently Browsing   0 members

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