Default layout across all groups

Help
2010-05-05
2013-05-23
  • David Musgrave
    David Musgrave
    2010-05-05

    Hi, I'm not sure if I'm missing something really obvious, but is there a way of setting the layout so that it is applied to all groups/pages?
    The only way I can get the correct layout settings at the moment is by selecting each group and configuring the layout manually..
    Thanks for any help.

     
  • Blade 1o6
    Blade 1o6
    2010-05-06

    Hello David,

    No, you're right, there's currently no option for that. Some people achieved it with some code I provided. The option should be available in a next release, but I can't tell you when.

    In «generate.php», near line 120, find:
    $layout = explode('>', $layout);
    if (count($layout) !== 4)
    {
            $layout = array('', 0, 0, 0);
    }

    Add just after:

    $layout = X;
    $layout = Y;
    $layout = Z;

    The values here should be found in one of your correctly configured layouts. For example, if you've set the layout for «website1» and «group1», look for the file: clickheat/logs/website1,group1/url.txt
    Then open it, and you'll see something like:
    http://yoursite.com/onepage.html>X>Y>Z

    Use those 3 values (X, Y, Z) in the code above, to obtain something like:

    $layout = 0;
    $layout = 1000;
    $layout = 0;

    And this should work. Beware, there's a 2 minutes caching system, so be sure to wait at least 2 min after your change to tell yourself it's not working :-)