Add a column to every page?

I'd like to add a third column to the main body of every page in my Dolphin site (between the main menu and the footer) - it seems like I would do that in the Page Builder in the Admin, but it doesn't seem to have an option to do this - it looks like I'd have to add it to each individual page - and that's a lot of pages!

Anybody know how to do this?

Thanks!

Al

Quote · 5 Mar 2010

Sounds like you want to add a ROW and not a COLUMN. Which, as you correctly pointed out, pagebuilder is not setup to do. You could try adding a table to the FOOTER for an additional ROW but you wont be able to use it in Pagebuilder etc.

 

 

Quote · 5 Mar 2010

Thanks, but no: I do mean a column - I want it in the area of the pages that's controlled by the Page Builder - the main content area.  I'm trying to avoid having to add it to every individual page, one page at a time, as Page Builder is set up to do.  A pain in the ass now and a nightmare every time I want to update the content of that column.

I'm trying to figure out if there's some simple way to add it to the basic layout of the whole site.

Quote · 6 Mar 2010

Bump! :)

Anybody know how to do this?

Quote · 7 Mar 2010

I am assuming you would want the content of that column to be the same in all pages.

I suppose this could be done in the script that generates the pages. inc\BxDolPageView.php

But it will require a lot of code rewrites.

No one is going to know how to do this off the top of their head.

It will require someone be willing to spend some time with the code to figure this out for you.

https://www.deanbassett.com
Quote · 7 Mar 2010

Curious here:  Couldn't he do this by initialing adding an html block to each page?  Meaning, it's time consuming at first, but a quick solution for future changes would be:

Add the column to each page where you want it and then add an HTML block to each on of those column.  When you create the html block have it call a language key that dolphin does not yet use.

Then, go to Language Settings and create a new language key and put the html code you want to appear in that column inside of that specific language key.  When you want to change the content of the specific column, you then just edit the language key one time with the new html coding you want and voila, all the pages update at once.

Is there any reason he can't do it this way?  Haven't tried it myself in D7, but I know in D6 we used to add Language Keys with Functionaliity all the time.

Quote · 7 Mar 2010

Actually that should work as well.  Good call, and it would be easier. The initial setup would take some time, but the content would be easy to manage.

https://www.deanbassett.com
Quote · 7 Mar 2010

Thanks, Mydatery and Deano for your help.

I've been stumbling around trying to do what you suggest, but I'm a bit of a dolt when it comes to this stuff - I'll get it eventually but I sure could use some help.

I went into page builder and dragged an HTML block up into one of the columns, then clicked on it to bring up the edit dialog.  I changed the Caption Lang Key: to "HTML BlockA" and saved it.  I went into Manage Languages and made a new language key named "HTML BlockA".

All of that seemed to work OK - am I doing it right?  I can go back into Page Builder and edit the "HTML-content:" of an individual instance on a single page, but I can't figure out where I'd edit the HTML so that it'll change all of instances of "HTML BlockA" on all of the different pages?

Thanks!

Quote · 8 Mar 2010

The Caption Lang Key is for the title. Not for the content.

In the html content use a language key. Like _MyContent.

Then add _MyContent in the languages as a new key. What you put in that language key should show up in the html block in place of the _MyContent key.

So the key acts as a reference to the content in the language for that key.

Confusing i know.


https://www.deanbassett.com
Quote · 8 Mar 2010

Actually i just tested this. Using a language key in the html content does not work on D7.

A PHP block would need to be used instead.

Then in the php block you could use either

echo _t('_ContentKey');

Or you could pull the contents of a html file.

echo file_get_contents('MyContent.html');


Dolphins page builder does not have a built in PHP Block. But you can add one with this mod here.

http://www.boonex.com/unity/forums/#topic/Add-PHP-blocks-to-Pagebuilder-for-D7.htm

https://www.deanbassett.com
Quote · 8 Mar 2010

Hey - I can't thank you guys enough.  I'm stumbling through and figuring things out and it seems like it's going to work just fine.

For others who are doing this who are as clueless as me: if you're using echo file_get_contents('MyContent.html'); in your PHP Block then the 'MyContent.html' file (or whatever else you decide to name it) goes in your top-level Dolphin directory (the one with the Doc, Flash, and Inc folders).

I still think they should have a function built into the Dolphin admin to add a column to all pages, but this work-around is totally excellent.  Thanks!

Al

Quote · 8 Mar 2010

OK - one more thing.

Looking at the work I need to do it seems like it would save a lot of repetitive work if I could use Deano's "Add PHP blocks to Pagebuilder for D7" mod but change it so that instead of adding generic PHP Blocks that I'll then have to edit in two different Admin dialogs, it would add blocks that are already named and Language Keyed as I need them to be.  Ideally I'll end up with 3 or 4 new blocks available in Page Builder that are named something like "PHP Content1", "PHP Content2", etc.

I've gone through the mod and tried to figure out how it needs to be changed, but I'm sure I'm wrong about some things and missing others.  Deano - would you be willing to look through this and see if it looks like I'm on the right track?

I've changed the SQL query so it looks like this:

INSERT INTO `sys_page_compose` (`Page`, `PageWidth`, `Desc`, `Caption`, `Column`, `Order`, `Func`, `Content`, `DesignBox`, `ColWidth`, `Visible`, `MinWidth`) VALUES ('', '998px', 'Simple PHP Block', '_PHPcontent1 Block', 0, 0, 'Sample', 'PHP', 1, 0, 'non,memb', 0)

And the Language keys that need to be created:

Key Name: _adm_pbuilder_PHPcontent1_Block
String Text: My PHP content headline


Click save and repeat for the next 2 keys.

Key Name: _adm_pbuilder_PHP_content
String Text: PHP-Content

Key Name: _PHPcontent1 Block
String Text: My PHP content headline

And then the edits to inc\classes\BxDolPageViewAdmin.php (I'm only including the code section that I've re-edited from Deano's original edits - I hope that's OK - I only found one obvious edit)

function showPropForm($iBlockID) {
$sNoPropertiesC = _t('_adm_pbuilder_This_block_has_no_properties');
$sProfileFieldsC = _t('_adm_pbuilder_Profile_Fields');
$sHtmlBlockC = _t('_adm_pbuilder_HTML_Block');
$sPHPBlockC = _t('_adm_pbuilder_PHPcontent1_Block');
$sXmlBlockC = _t('_adm_pbuilder_XML_Block');
$sRssBlockC = _t('_adm_pbuilder_RSS_Feed');
$sSpecialBlockC = _t('_adm_pbuilder_Special_Block');
$sHtmlContentC = _t('_adm_pbuilder_HTML_content');
$sPHPContentC = _t('_adm_pbuilder_PHP_content');
$sXmlPathC = _t('_adm_pbuilder_XML_path');

I'm afraid to try it because I'd have no idea how to fix things if I screw up :)

Thanks!

Al

Quote · 9 Mar 2010

Just giving this a little bump in hopes that someone will be able to help me with my last post.

Quote · 10 Mar 2010
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.