| Name | djangocms-alias JSON |
| Version |
3.0.1
JSON |
| download |
| home_page | None |
| Summary | An alias is a collection of plugins that is managed centrally. |
| upload_time | 2025-09-18 20:35:43 |
| maintainer | None |
| docs_url | None |
| author | None |
| requires_python | >=3.10 |
| license | None |
| keywords |
django
django-cms
alias
plugins
|
| VCS |
 |
| bugtrack_url |
|
| requirements |
No requirements were recorded.
|
| Travis-CI |
No Travis.
|
| coveralls test coverage |
No coveralls.
|
****************
django CMS Alias
****************
|PyPiVersion| |Coverage| |DjVersion| |CmsVersion|
django CMS Alias replicates and extends the alias function of django CMS version 3 for
django CMS version 4 and later.
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.
Aliases are created and edited independently of their usage through their own dedicated editing
endpoints, i.e. outside of django CMS pages. This allows content managers to maintain alias
content without needing to navigate to a page where the alias is used.
When editing a page that contains static aliases, these aliases are shown in the structure board,
providing visibility into the alias' content while maintaining the separation between alias management
and page editing. If the static alias can be changed, it is fully accessible through the structure board.
Static aliases cannot be changed in the structure board on views that have no editing interface.
django CMS Alias supports versioning aliases by django CMS Versioning.
.. warning::
django CMS Alias 3 and later require django CMS 5.0 or later.
Use ``djangocms-alias>=2,<3`` for django CMS 4.1.
============
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 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.
=============
Configuration
=============
django CMS Alias provides several Django settings to control its behavior:
``STATIC_ALIAS_EDITING_ENABLED``
Default: ``True``
Controls whether static aliases can be edited directly on frontend editable objects
(such as pages) that include the ``{% static_alias %}`` template tag. When set to ``False``,
static aliases will not be visible in the structure board and only editable from the alias
admin endpoint.
``VERSIONING_ALIAS_MODELS_ENABLED``
Default: ``True`` (if djangocms-versioning is installed)
Enables versioning support for alias models when djangocms-versioning is available. When enabled,
aliases support draft/published workflows, version history, and proper content lifecycle management.
Set to ``False`` to disable versioning for aliases even if djangocms-versioning is installed. Any changes
to any alias will then be immediately visible to the world.
``MODERATING_ALIAS_MODELS_ENABLED``
Default: ``True`` (if djangocms-moderation is installed)
Enables moderation workflows for alias models when djangocms-moderation is available. When enabled,
aliases can be subject to approval workflows before publication. Set to ``False`` to disable moderation
for aliases even if djangocms-moderation is installed.
=====
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>
**New in version 3**: Static aliases can now be edited directly on any frontend
editable object (such as pages) that includes the ``{% static_alias %}``
template tag. Static aliases are marked by a pin icon in the structure board to
distinguish them from regular content.
Editing static aliases on the page provides a convenient way to manage alias
content in context. However, when using djangocms-versioning, there are important
considerations:
**Versioning Considerations:**
* **Independent Publishing**: Static aliases must be published independently from
their edit endpoint. Use the edit entry in the alias's burger menu in the structure
board to access the full alias editing interface.
* **Published Content Only**: When objects are viewed on the site (not in edit mode),
only the latest published alias version is displayed. If no published version exists,
nothing will be shown.
* **Draft Creation Required**: Published aliases cannot be edited - neither in the
structure menu nor on their dedicated endpoint. You must create a new draft version
of the alias before editing is possible.
This workflow ensures content consistency and proper version control while providing the flexibility to edit aliases in context when appropriate.
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.
=========
Templates
=========
For the plugin to work out of the box ``{% block content %}`` is expected to exist in your main ``base.html`` file.
Here is the template hierarchy for the edit and preview endpoints::
base.html
└── djangocms_alias/base.html {% block content %}
└── djangocms_alias/alias_content_preview.html {% block alias_content %}
Use Django's template override mechanism to customize these templates as needed. Say, if your base template has
a different name and the content goes into a block called ``main_content``, you would create a template at
``templates/djangocms_alias/base.html`` with the following content::
{% extends "mybase.html" %}
{% load i18n %}
{% block title %}{% translate "Aliases" %}{% endblock %}
{% block main_content %}
<div class="aliases my-additional-class">
{% block aliases_content %}
{% endblock aliases_content %}
</div>
{% endblock main_content %}
.. |PyPiVersion| image:: https://img.shields.io/pypi/v/djangocms-alias.svg?style=flat-square
:target: https://pypi.python.org/pypi/djangocms-alias
:alt: Latest PyPI version
.. |Coverage| image:: https://codecov.io/gh/django-cms/djangocms-alias/graph/badge.svg?token=UUkVjsHGcA
:target: https://codecov.io/gh/django-cms/djangocms-alias
.. |PyVersion| image:: https://img.shields.io/pypi/pyversions/djangocms-alias.svg?style=flat-square
:target: https://pypi.python.org/pypi/djangocms-alias
:alt: Python versions
.. |DjVersion| image:: https://img.shields.io/pypi/frameworkversions/django/djangocms-alias.svg?style=flat-square
:target: https://pypi.python.org/pypi/djangocms-alias
:alt: Django versions
.. |CmsVersion| image:: https://img.shields.io/pypi/frameworkversions/django-cms/djangocms-alias.svg?style=flat-square
:target: https://pypi.python.org/pypi/djangocms-alias
:alt: django CMS versions
Raw data
{
"_id": null,
"home_page": null,
"name": "djangocms-alias",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": "Django CMS Association and contributors <info@django-cms.org>",
"keywords": "django, django-cms, alias, plugins",
"author": null,
"author_email": "Divio AG <info@divio.ch>",
"download_url": "https://files.pythonhosted.org/packages/3d/b5/cb012a6d9b0bb0b14766da909ff495f9cafd73faf5ce7cbfc6009e113240/djangocms_alias-3.0.1.tar.gz",
"platform": null,
"description": "****************\ndjango CMS Alias\n****************\n\n|PyPiVersion| |Coverage| |DjVersion| |CmsVersion|\n\ndjango CMS Alias replicates and extends the alias function of django CMS version 3 for\ndjango CMS version 4 and later.\n\nAn alias is a collection of plugins that is managed centrally. A reference can be added to\nany placeholder using the Alias plugin. Since the Alias plugin creates a reference any changes\nto the alias are immediately reflected at all places it is used.\n\nAliases are created and edited independently of their usage through their own dedicated editing\nendpoints, i.e. outside of django CMS pages. This allows content managers to maintain alias\ncontent without needing to navigate to a page where the alias is used.\n\nWhen editing a page that contains static aliases, these aliases are shown in the structure board,\nproviding visibility into the alias' content while maintaining the separation between alias management\nand page editing. If the static alias can be changed, it is fully accessible through the structure board.\n\nStatic aliases cannot be changed in the structure board on views that have no editing interface.\n\ndjango CMS Alias supports versioning aliases by django CMS Versioning.\n\n.. warning::\n\n django CMS Alias 3 and later require django CMS 5.0 or later.\n\n Use ``djangocms-alias>=2,<3`` for django CMS 4.1.\n\n\n============\nInstallation\n============\n\nRequirements\n============\n\ndjango CMS Alias requires that you have a django CMS 4 (or higher) project already running and set up.\n\n\nTo install\n==========\n\nRun::\n\n pip install djangocms-alias\n\nAdd ``djangocms_alias`` and ``parler`` to your project's ``INSTALLED_APPS``.\n\nRun::\n\n python manage.py migrate djangocms_alias\n\nto perform the application's database migrations.\n\n\n=============\nConfiguration\n=============\n\ndjango CMS Alias provides several Django settings to control its behavior:\n\n``STATIC_ALIAS_EDITING_ENABLED``\n Default: ``True``\n\n Controls whether static aliases can be edited directly on frontend editable objects\n (such as pages) that include the ``{% static_alias %}`` template tag. When set to ``False``,\n static aliases will not be visible in the structure board and only editable from the alias\n admin endpoint.\n\n``VERSIONING_ALIAS_MODELS_ENABLED``\n Default: ``True`` (if djangocms-versioning is installed)\n\n Enables versioning support for alias models when djangocms-versioning is available. When enabled,\n aliases support draft/published workflows, version history, and proper content lifecycle management.\n Set to ``False`` to disable versioning for aliases even if djangocms-versioning is installed. Any changes\n to any alias will then be immediately visible to the world.\n\n``MODERATING_ALIAS_MODELS_ENABLED``\n Default: ``True`` (if djangocms-moderation is installed)\n\n Enables moderation workflows for alias models when djangocms-moderation is available. When enabled,\n aliases can be subject to approval workflows before publication. Set to ``False`` to disable moderation\n for aliases even if djangocms-moderation is installed.\n\n\n=====\nUsage\n=====\n\nStatic aliases\n==============\n\nStatic aliases appear in templates and replace static placeholders which were part of django CMS up to version 3.x.\n\nExample::\n\n {% load djangocms_alias_tags %}\n ...\n <footer>\n {% static_alias 'footer' %}\n </footer>\n\n**New in version 3**: Static aliases can now be edited directly on any frontend\neditable object (such as pages) that includes the ``{% static_alias %}``\ntemplate tag. Static aliases are marked by a pin icon in the structure board to\ndistinguish them from regular content.\n\nEditing static aliases on the page provides a convenient way to manage alias\ncontent in context. However, when using djangocms-versioning, there are important\nconsiderations:\n\n**Versioning Considerations:**\n\n* **Independent Publishing**: Static aliases must be published independently from\n their edit endpoint. Use the edit entry in the alias's burger menu in the structure\n board to access the full alias editing interface.\n\n* **Published Content Only**: When objects are viewed on the site (not in edit mode),\n only the latest published alias version is displayed. If no published version exists,\n nothing will be shown.\n\n* **Draft Creation Required**: Published aliases cannot be edited - neither in the\n structure menu nor on their dedicated endpoint. You must create a new draft version\n of the alias before editing is possible.\n\nThis workflow ensures content consistency and proper version control while providing the flexibility to edit aliases in context when appropriate.\n\nAlias plugin\n============\n\nAlternatively, aliases can be used with the Alias plugin. It allows to select which alias content is shown at the\nexact position the alias plugin is placed.\n\n=========\nTemplates\n=========\nFor the plugin to work out of the box ``{% block content %}`` is expected to exist in your main ``base.html`` file.\nHere is the template hierarchy for the edit and preview endpoints::\n\n base.html\n \u2514\u2500\u2500 djangocms_alias/base.html {% block content %}\n \u2514\u2500\u2500 djangocms_alias/alias_content_preview.html {% block alias_content %}\n\nUse Django's template override mechanism to customize these templates as needed. Say, if your base template has\na different name and the content goes into a block called ``main_content``, you would create a template at\n``templates/djangocms_alias/base.html`` with the following content::\n\n {% extends \"mybase.html\" %}\n {% load i18n %}\n\n {% block title %}{% translate \"Aliases\" %}{% endblock %}\n {% block main_content %}\n <div class=\"aliases my-additional-class\">\n {% block aliases_content %}\n {% endblock aliases_content %}\n </div>\n {% endblock main_content %}\n\n\n\n.. |PyPiVersion| image:: https://img.shields.io/pypi/v/djangocms-alias.svg?style=flat-square\n :target: https://pypi.python.org/pypi/djangocms-alias\n :alt: Latest PyPI version\n.. |Coverage| image:: https://codecov.io/gh/django-cms/djangocms-alias/graph/badge.svg?token=UUkVjsHGcA\n :target: https://codecov.io/gh/django-cms/djangocms-alias\n\n.. |PyVersion| image:: https://img.shields.io/pypi/pyversions/djangocms-alias.svg?style=flat-square\n :target: https://pypi.python.org/pypi/djangocms-alias\n :alt: Python versions\n\n.. |DjVersion| image:: https://img.shields.io/pypi/frameworkversions/django/djangocms-alias.svg?style=flat-square\n :target: https://pypi.python.org/pypi/djangocms-alias\n :alt: Django versions\n\n.. |CmsVersion| image:: https://img.shields.io/pypi/frameworkversions/django-cms/djangocms-alias.svg?style=flat-square\n :target: https://pypi.python.org/pypi/djangocms-alias\n :alt: django CMS versions\n",
"bugtrack_url": null,
"license": null,
"summary": "An alias is a collection of plugins that is managed centrally.",
"version": "3.0.1",
"project_urls": {
"Bug Tracker": "https://github.com/django-cms/djangocms-alias/issues",
"Documentation": "https://github.com/django-cms/djangocms-alias",
"Homepage": "https://github.com/django-cms/djangocms-alias",
"Repository": "https://github.com/django-cms/djangocms-alias"
},
"split_keywords": [
"django",
" django-cms",
" alias",
" plugins"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "fcb671cba1002c8e225a342bab3eb52f06aa4fcde90d51bd340f7f05e8f9d084",
"md5": "2a8fc4961dbd0f7a70c2a471095290e1",
"sha256": "c25164c89364e823e863cbb7de70566b6febf0ca103c374b5ea746a4046c1d59"
},
"downloads": -1,
"filename": "djangocms_alias-3.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "2a8fc4961dbd0f7a70c2a471095290e1",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 65022,
"upload_time": "2025-09-18T20:35:41",
"upload_time_iso_8601": "2025-09-18T20:35:41.619645Z",
"url": "https://files.pythonhosted.org/packages/fc/b6/71cba1002c8e225a342bab3eb52f06aa4fcde90d51bd340f7f05e8f9d084/djangocms_alias-3.0.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "3db5cb012a6d9b0bb0b14766da909ff495f9cafd73faf5ce7cbfc6009e113240",
"md5": "779b42495dcacbaa221950b9dd4e3369",
"sha256": "ed82d92261cfb70d00c8dcdcdd2df244efffdb62f9ed811642f48a340c297090"
},
"downloads": -1,
"filename": "djangocms_alias-3.0.1.tar.gz",
"has_sig": false,
"md5_digest": "779b42495dcacbaa221950b9dd4e3369",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 68053,
"upload_time": "2025-09-18T20:35:43",
"upload_time_iso_8601": "2025-09-18T20:35:43.041549Z",
"url": "https://files.pythonhosted.org/packages/3d/b5/cb012a6d9b0bb0b14766da909ff495f9cafd73faf5ce7cbfc6009e113240/djangocms_alias-3.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-09-18 20:35:43",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "django-cms",
"github_project": "djangocms-alias",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"tox": true,
"lcname": "djangocms-alias"
}