Loading...
 

Custom Closable Banner (version 0.1dev)

Custom Closable Banner creates and assigns a custom module featuring a "Custom Closable Banner".

Screenshots



Known Issues & Limitations

  • There are currently no known issues or limitations


Installation & Update

To add this Profile repository to your Tiki add the line below to your Admin (Control Panels) → "Profiles" → "Advanced" tab → "Repository URLs" text area:
https://profiles.luciash.eu/profiles

If you do an update please do not forget to unassign the previous version of the profile module in Modules, otherwise you will end up with multiple versions of the module applied.

By hitting the Apply Now button on Control PanelsProfiles control panel (or Forget and Re-apply if you want to do an update) the following YAML code will be applied:

YAML
objects:
 -
  type: module
  data:
   name: Custom Closable Banner 0.1dev
   groups: [ Admins ]
   position: bottom
   order: 999
   params:
    nobox: y
   custom: |
    <style type="text/css">{literal}
    .custom-banner {
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 1rem;
    z-index: 999;
    }
    .hidden {display: none}
    {/literal}</style>{jq}{literal}
    if (getCookie('custom-banner') != 'hidden') {
      $('.custom-banner').removeClass('hidden').hide().delay('500').fadeIn('slow');
    }
    $('.custom-close').on('click', function(event) {
     event.preventDefault();
     $('.custom-banner').fadeOut('slow');
     setCookie("custom-banner","hidden");
    });
    {/literal}{/jq}<div class="custom-banner hidden"><p>Custom Closable Banner Content Here</p> <a class="btn btn-primary custom-close" href="#">Close</a></div>


Usage

This profile creates a custom module with a "Custom Closable Banner" in it.
The module will be assigned to the bottom zone. After applying the profile the module is visible only to Admins. When you are done with the customization and the module content is ready to be published just edit the assigned module in the bottom zone and remove the Admins group from the groups field.
You can put whatever you want instead of the "Custom Closable Banner Content Here" text. For example:
"This website uses cookies for providing better services, ad personalization and visitor analysis. You agree to their use by browsing this website. Learn more <a href="Cookies">here</a>."
When you click the Close button, a cookie named custom-banner is stored in your browser and the module content will be hidden.

Uninstall

Just unassign and delete the module on the Admin → Modules page.