Skip to content

django-cms/djangocms-alias

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Folders and files

NameName
Last commit message
Last commit date
Jul 3, 2024
Feb 9, 2024
Nov 14, 2024
Dec 6, 2024
Feb 9, 2024
Jul 9, 2018
Jan 13, 2023
May 31, 2022
Dec 3, 2024
Aug 20, 2024
Feb 9, 2024
May 23, 2023
Jan 16, 2024
Sep 21, 2023
Apr 25, 2018
May 31, 2022
Oct 12, 2024
May 31, 2022
Feb 19, 2024
Feb 9, 2024
Jun 18, 2024
Feb 12, 2024
Dec 12, 2023
May 31, 2022

Repository files navigation

django CMS Alias

coverage python django djangocms4

django CMS Alias replicates and extends the alias function of django CMS version 3 for django CMS version 4.

An alias is a collection of plugins that is managed centrally. A reference can be added to any placeholder using the Alias plugin. Since the Alias plugin creates a reference any changes to the alias are immediately reflected at all places it is used.

django CMS Alias supports versioning aliases by django CMS Versioning.

Warning

This is the development branch for django CMS version 4.1 support.

For django CMS V4.0 support, see support/django-cms-4.0.x branch

Installation

Requirements

django CMS Alias requires that you have a django CMS 4 (or higher) project already running and set up.

To install

Run:

pip install git+https://github.com/django-cms/djangocms-alias@master#egg=djangocms-alias

Add djangocms_alias and parler to your project's INSTALLED_APPS.

Run:

python manage.py migrate djangocms_alias

to perform the application's database migrations.

Usage

Static aliases

Static aliases appear in templates and replace static placeholders which were part of django CMS up to version 3.x.

Example:

{% load djangocms_alias_tags %}
...
<footer>
  {% static_alias 'footer' %}
</footer>

Alias plugin

Alternatively, aliases can be used with the Alias plugin. It allows to select which alias content is shown at the exact position the alias plugin is placed.

Side notes

For the plugin to work out of the box {% block content %} is expected to exist in your main base.html file.