use global blocks

Permalink Browser Info Environment
Is it possible to get back global blocks? and have another page list set up on the same page getting back non global blocks?

I have created a second template in the package (packages\page_list_teasers\blocks\page_list\templates) but not sure what to change to get the blocks as global.

I really need global blocks to make the system work. please can you help me out?

Thank you

Type: Discussion
Status: New
chris123uk
View Replies:
chris123uk replied on at Permalink Reply
chris123uk
ah found a work around:

the reason i needed the global block is because i needed a global block for each tier of the navigation.

so each drop down catagory would have its top lvl decription ediable all in on place.

so to make it automated i used the id of the pages to update there handle

as its a global block i can just append the id of the page to its handle and get it back on another page:


This is on the child page:
<?php
if ($c->cID > 1) {
$nh = Loader::helper('navigation');
$arrTrail = array_reverse($nh->getTrailToCollection($c));
$objHomePage = $arrTrail[0]; // Home page object;

// If we're on a top-level page then our $arrTrail array will only have the home page object
// so we test to see if its Page object exists
$objTopPage = is_object($arrTrail[2]) && $arrTrail[2] instanceof Page && !$arrTrail[2]->error ? $arrTrail[2] : $c;

// If we have a valid top page Page object we retrieve
$title = $objTopPage->getCollectionName();
$url = $nh->getLinkToCollection($objTopPage);
$pID = $objTopPage->getCollectionID();
// print parent
echo '<br><br>This is my second parents name and link: <li><a class="current" href="' . $url . '"' . '>' . $title . '</a>' . '</li>';
echo '<br>This is my second parents page id: '. $pID .'';
}

?>

<?php $a = new GlobalArea ('handle'. $pID .''); $a->display($c); ?>



this is the parent page getting back the global block from its child
<?php $a = new GlobalArea ('handle'. $c->getCollectionID() .''); $a->display($c); ?>


just though i would post it here so you didnt think i still needed help.

but thanks any way i will be using your package on other parts of the site! wooooop
jordanlev replied on at Permalink Reply
jordanlev
Hi Chris,
Glad you found a solution. I've actually run into some problems myself when trying to pull in blocks that were pasted from the scrapbook, as well as stacks (which are somewhat related to global areas). One of these days I'll try to update the addon to address these issues (not sure when exactly that will be though).

And I'm not sure if the situation you describe fits exactly, but my colleague wrote a blog post a few months back about how to have different global areas in different sections of the site:http://concrete5tricks.com/blog/sectionwide-areas/...

Best,
Jordan

concrete5 Environment Information

Browser User-Agent String

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You have not specified a license for this support ticket. You must have a valid license assigned to a support ticket to request a refund.