Jump to:

10928 Posts in 2612 Topics by 1809 members

All other Modules

SilverStripe Forums » All other Modules » Cookiebar module installation problem

Discuss all other Modules here.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 381 Views
  • beren
    Avatar
    Community Member
    9 Posts

    Cookiebar module installation problem Link to this post

    I've got Cookiebar module from https://github.com/arambalakjian/Cookie-Bar and it looks really nice and handy
    It might not be the problem with this module (as it's 1st one i try to install) only to be honest but help will be very appreciated.

    I've done all steps as per the installation guide and the cookie bar do not appear on my site (plus flushing the site, browser cleaning).

    I run SS 3.0.2 on win7 x64 with XAMP.
    I named the folder "Cookie-Bar" but as per instruction folder can have any name.
    Path is: C:\xampp\htdocs\Cookie-Bar\

    So maybe i did something wrong or i did not do something?
    But when checking page <mysite>/?showtemplate=1 i can see in place where i put "<% include CookieBar %>" into page.ss this line:
    $val .= SSViewer::execute_template('CookieBar', $scope->getItem(), array());

    And there is also code from cookiebar module template :

    Template: C:\Windows\TEMP/silverstripe-cacheC--xampp-htdocs/.cache.Cookie-Bar.templates.Includes.CookieBar.ss
    1 <?php
    2 if ($scope->hasValue('ShowCookieBar', null, true)) {
    3 $val .= '
    4    ';
    5
    6 $scope->obj('SiteConfig', null, true); $scope->pushScope();
    7 $val .= '
    8       <div id="cookieBar">
    9          <div class="container">
    10             <div class="description typography">
    11                ';
    12
    13 if ($scope->hasValue('CookieImage', null, true)) {
    14 $val .= '
    15                   ';
    16
    17 $val .= $scope->obj('CookieImage', null, true)->XML_val('SetHeight', array('80'), true);
    18 $val .= '
    19                ';
    20
    21
    22 }
    23 $val .= '
    24
    25 <p class="intro"><strong>';
    26
    27 $val .= $scope->XML_val('CookieBarTitle', null, true);
    28 $val .= '</strong> <a href="' . (SSViewer::$options['rewriteHashlinks'] ? strip_tags( $_SERVER['REQUEST_URI'] ) : "") . '#" class="more">Show more</a></p>
    29
    30                <div class="content">
    31                 ';
    32
    33 $val .= $scope->XML_val('CookieBarContent', null, true);
    34 $val .= '
    35                </div>
    36             </div>
    37             <div class="links">
    38                <a id="acceptCookies" href="';
    39
    40 $val .= $scope->obj('Top', null, true)->XML_val('AcceptCookiesLink', null, true);
    41 $val .= '">';
    42
    43 $val .= $scope->XML_val('CookieCloseText', null, true);
    44 $val .= '</a>
    45                ';
    46
    47 if ($scope->hasValue('CookiePage', null, true)) {
    48 $val .= '
    49                   <a href="';
    50
    51 $val .= $scope->obj('CookiePage', null, true)->XML_val('Link', null, true);
    52 $val .= '" class="infoLink">';
    53
    54 $val .= $scope->XML_val('CookieMoreText', null, true);
    55 $val .= '</a>
    56                ';
    57
    58
    59 }
    60 $val .= '
    61             </div>
    62             <div class="clear"><!-- --></div>
    63          </div>
    64       </div>
    65    ';
    66
    67
    68 ; $scope->popScope();
    69 $val .= '
    70 ';
    71
    72
    73 }
    74 $val .= '
    75
    76 ';

    Thanks in advance.

  • Aram
    Avatar
    Community Member
    598 Posts

    Re: Cookiebar module installation problem Link to this post

    Did you set it up in the Site Config? You need to check the 'Show Cookie bar' box for it to show up

    Aram

  • beren
    Avatar
    Community Member
    9 Posts

    Re: Cookiebar module installation problem Link to this post

    Holy duck!

    I got it now, I am blind as I've checked the CMS admin site twice at least and I did not see cookie-bar tab.
    Now i will try to configure it.

    Thank you very, very much!

  • Aram
    Avatar
    Community Member
    598 Posts

    Re: Cookiebar module installation problem Link to this post

    No problem, glad it's useful

  • Spiggley
    Avatar
    Community Member
    12 Posts

    Re: Cookiebar module installation problem Link to this post

    Hi Aram, Cookie bar looks great, but I would like to put onto a 2.4 site. I can't find your 2.4 branch. Is it lost forever? Any help gratefully recieved.

  • Aram
    Avatar
    Community Member
    598 Posts

    Re: Cookiebar module installation problem Link to this post

    Hi Spiggley,

    You should be able to find it here: https://github.com/arambalakjian/Cookie-Bar/tree/2.4

    Cheers,

    Aram

  • Spiggley
    Avatar
    Community Member
    12 Posts

    Re: Cookiebar module installation problem Link to this post

    Thanks very much Aram.

    381 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.