jubasolo wrote:
Hi, there
Mark or Streever (or both): Could you please explain how you got the Page Blocks to work? I have the same problem with the "Add Block" link not showing up. Is there anything I can do to make it work like in the version Savaii ??
Jonathan
Jonathan,
This is not about solving the pageblock problem. The pageblocks are no longer supported so this is about a new way of making a new cind of pageblocks, better if you ask me!.
Ill try to explain please don't bite me if you already know or if my English is not zo good.
First thing I did is copy my default template and ad this:
Code: Select all
<div style="float: right;">{print showbutton=true script=true}</div>
<div class="lijn"></div>
<table class="info-blok">
<tr >
<td class="title-blok" colspan=2 ><h1 class="front-h4">{content block="titel" oneline="true"} (u kunt deze pagina gebruiken voor printen of info aan te vragen.</h4></td></tr>
<tr >
<td class="afbeelding-blok">{content block="afbeelding"}</td>
<td class="omschrijving">{content block="omschrijving"}</td></tr>
<tr>
<td class="afbeelding-blok"></td>
<td class="data">{content block="data"}</td>
</tr>
<tr>
<td colspan="2" class="offerte-knop">Offerte/info aanvragen over {title}:</br>{cms_module module='FormBuilder' form='pat-contact'}</td></tr>
</table>
Under {content} I use the divs and tables becouse the child that I use to take the info out of is also visible.
Wy well now I can display only the wanted product instead of a collection of children. This single product page can be used to print or ask for info.
If you dont use the child (pageblock) to show then this:
{content block="titel" oneline="true"}
{content block="afbeelding"}
{content block="omschrijving"}
{content block="data"}
Is more then you will need.(this way you use the child like pageblocks)
I call the above mentioned template Input-content or you could call it "pageblock".
Then I make a second template which is the product page in my situation this page collects al the children beneath.
I call this Template "product-page". This is actually the template u use for the pages that you want to show their children wich use the template "input-content".
Code: Select all
{foreach from=$cgsimple->get_children('','',$children) item='child'}
{if $child}
<div class="lijn"></div>
<table class="info-blok">
<tr >
<td class="title-blok" colspan=2 ><h1 class="front-h4">{$cgsimple->get_page_content($child.alias,'titel')}</h4></td></tr>
<tr >
<td class="afbeelding-blok">{$cgsimple->get_page_content($child.alias,'afbeelding')}</td>
<td class="omschrijving">{$cgsimple->get_page_content($child.alias,'omschrijving')}</td></tr>
<tr>
<td class="afbeelding-blok"></td>
<td class="data">{$cgsimple->get_page_content($child.alias,'data')} </td>
</tr>
</table>
</br>
{/if}
{/foreach}
So now when you want a page block in this new setup you just ad a new page in your admin/pages
You gif this page the template "input-content" you place this page under the page you want to get the info into.
Next go to the page (parent of that child) that needs to collect this info and gif this the template "product-page" (the name in my situation).
Now it should work, you can put as many pages (pageblocks) under the page with template "product-page" as you want like you used to with the old pageblocks.
That's all I did to make it work for me! remember you need CGSimpleSmarty module
for this to work.
I like this contribution because you can ad edit the new pageblocks on the same page as where you ad edit your pages.
I hope this was helpful for you?