Make a slide global

Permalink Browser Info Environment
Hi,

I'm currently working on http://www.grafomantestsite3.be/....

As you enter the site, you can see at the bottom i'm using 2 slides for the footer.
Can i make these 2 slides global? So every page has them?

Thanks!

Grafoman.

Type: Pre-Sale
Status: In Progress
grafoman
View Replies:
jordif replied on at Permalink Reply
jordif
Hi!

Yes, it should be possible to have to extra global slides at the end of the page.

You'need to edit the default.php file and make the following changes:

1. Find this line:

for ($i = 1; $i <= $numSlides; $i++) {


Replace it with this:

for ($i = 1; $i <= ($numSlides+2); $i++) {



2. Find this code:

$areaname = "Slide ".$i;
  $a = new Area($areaname);


Replace it with this:

if ( $i > $numSlides ) {
    $areaname = "Footer Slide ". ($i-$numSlides);
    $a = new GlobalArea($areaname);    
  }
  else {
    $areaname = "Slide ".$i;
    $a = new Area($areaname);    
  }


3. Find this code:

$a->enableGridContainer();
  $a->display($c);


Replace it with this:

if ( $i > $numSlides ) {
    $a->display();
  }
  else {
    $a->enableGridContainer();
    $a->display($c);
  }



Note that layouts are not supported in global areas, so you will not be able to add a layout with different columns to those slides. Anyway, you can always add an HTML block with the bootstrap code for the columns.

Hope this helps!

Jordi
grafoman replied on at Permalink Reply
grafoman
Hi,

Thanks for the quick answer! This will be very handy in the future!
To bad the lay-outs do not work globally :(.

Thanks man!

Grafoman

concrete5 Environment Information

Unable to load

Browser User-Agent String

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36

Hide Post Content

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

Hide Content

Request Refund

You may not request a refund that is not currently owned by you.