Cohesion Basic is an experimental set of modules, features and config which automates some of the Cohesion installation and configuration steps.
At a high level, it provides:
Cohesion Pagecontent type, which can be used to create pages and place Cohesion components on them. You could create a campaign, landing or even homepage using this content type.Cohesion blockblock type, which can be used to create blocks and place Cohesion components on them. You could create a Footer or a Header block and use it on different pages of your site.- Sub-modules to import the UI Kit, which provides a rich set of common webpage components.
- Required theme changes without modifications of your existing Drupal theme code.
- A simple Image Browser for sites which do not have one already.
To prepare your codebase for Cohesion follow instructions on Acquia Cohesion User Guide
Skip step "5. Enable Acquia Cohesion" for now. Cohesion Basic will enable the modules for you.
After Cohesion modules are added, add the cohesion_basic module to modules/custom folder or run:
composer config repositories.cohesion_basic vcs https://github.com/alexku/cohesion_basic
composer require alexku/cohesion_basic:dev-master
If your site does not have an Image Browser and you will want to use simple Image Browser from cohesion_basic_media module, run this command:
composer require drupal/views_infinite_scroll
-
Enable
cohesion_basicmodule. -
Configure Cohesion keys on page /admin/cohesion/configuration/account-settings
-
Configure image browsers on page /admin/cohesion/configuration/system-settings
-
Enable
cohesion_basic_mediamodule to get a simple Drupal core media based image browser configured. -
Configure the Color palette: /admin/cohesion/cohesion_website_settings/color_palette/bulk_edit and other styling settings to align cohesion styling with main website theme. Check this page for additional instructions.
-
Enable
cohesion_uikit_mobilefirstORcohesion_uikit_desktopfirstmodule to import the UI kit and disable master templates. The module will import significant amount of config and it is best to enable the module separately from other modules. Do not enable both modules at the same time. -
Rebuild Cohesion: /admin/cohesion/developer/rebuild
-
Create a page: /node/add/cohesion_canvas_page or a block: /block/add/cohesion_canvas_block
If you install the Theme Switcher Rules module, Cohesion Basic will add an example theme switcher rule.
The rule is disabled by default. Once enabled it will switch site theme to cohesion_theme on all cohesion_canvas_page node pages.
Rules are configured on page: /admin/config/system/theme_switcher
Theme switching allows you to create standalone "micro-site" or "campaign" type pages, which have to look differently than the rest of the site.
- Dependency on the
featuresmodule. Config import bycohesion_uikit_mobilefirstandcohesion_uikit_desktopfirstmodules has problems withoutfeaturesmodule. - UI Kit components imported from features are missing preview / thumbnail images.
- Import of UI Kit results in translation related warnings / errors.
- If your custom theme is configured to be used as default site theme and administration theme at the same time, Cohesion styles (CSS) will not be added correctly.
- Hiding regions or switching theme from cohesion_canvas_page content type.
cohesion_basic_mediamodule could set the Cohesion image browser setting, if there is no image browser configured.- Nodes with Cohesion components added to a site using blocks can allow preview and moderation of site header and footer.
cohesion_basicmodule currently setscohesion: trueand adds the<cohesion-placeholder>tag to all enabled themes. We could provide a configuration form to choose which themes should be modified.