{"id":18831380,"url":"https://github.com/django-cms/djangocms-alias","last_synced_at":"2026-05-14T08:02:36.922Z","repository":{"id":38085505,"uuid":"128398685","full_name":"django-cms/djangocms-alias","owner":"django-cms","description":"Provides collections of plugins that are managed centrally. References can be added to any placeholder.","archived":false,"fork":false,"pushed_at":"2026-05-14T06:32:11.000Z","size":1017,"stargazers_count":13,"open_issues_count":4,"forks_count":30,"subscribers_count":9,"default_branch":"master","last_synced_at":"2026-05-14T07:28:57.305Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/django-cms.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.rst","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2018-04-06T13:31:24.000Z","updated_at":"2026-05-14T06:30:46.000Z","dependencies_parsed_at":"2026-01-02T07:01:51.586Z","dependency_job_id":null,"html_url":"https://github.com/django-cms/djangocms-alias","commit_stats":{"total_commits":204,"total_committers":30,"mean_commits":6.8,"dds":0.8725490196078431,"last_synced_commit":"3ba3433bcd998f8d8ac337c36a3e2a58fb081a24"},"previous_names":[],"tags_count":42,"template":false,"template_full_name":null,"purl":"pkg:github/django-cms/djangocms-alias","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/django-cms%2Fdjangocms-alias","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/django-cms%2Fdjangocms-alias/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/django-cms%2Fdjangocms-alias/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/django-cms%2Fdjangocms-alias/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/django-cms","download_url":"https://codeload.github.com/django-cms/djangocms-alias/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/django-cms%2Fdjangocms-alias/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33015817,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-13T13:14:54.681Z","status":"online","status_checked_at":"2026-05-14T02:00:06.663Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T01:53:43.565Z","updated_at":"2026-05-14T08:02:36.914Z","avatar_url":"https://github.com/django-cms.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"****************\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\u003e=2,\u003c3`` 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    \u003cfooter\u003e\n      {% static_alias 'footer' %}\n    \u003c/footer\u003e\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        └── djangocms_alias/base.html {% block content %}\n              ├── djangocms_alias/\u003cstatic_code\u003e/alias_content_preview.html  {% block alias_content %}\n              └── djangocms_alias/alias_content_preview.html                {% block alias_content %}\n\nFor static aliases, ``\u003cstatic_code\u003e`` is the alias static code (or placeholder slotname when no static code is set).\ndjango CMS Alias first tries the slot-specific preview template and falls back to\n``djangocms_alias/alias_content_preview.html``.\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        \u003cdiv class=\"aliases my-additional-class\"\u003e\n            {% block aliases_content %}\n            {% endblock aliases_content %}\n        \u003c/div\u003e\n    {% endblock main_content %}\n\nCustomizing the alias preview template\n======================================\n\nWhen editing or previewing content managed via ``djangocms-alias`` (for example,\nstatic aliases like headers or footers), django CMS renders the content inside\na dedicated template.\n\nThis template may extend your project's ``base.html`` template by default.\nThis could cause the full page layout to be displayed while editing a small piece of\ncontent and make it difficult to focus on the alias itself.\n\nYou can override this default behaviour by supplying your own template at::\n\n    templates/djangocms_alias/base.html\n\nFor static aliases you can also provide a slot-specific preview template at::\n\n    templates/djangocms_alias/\u003cstatic_code\u003e/alias_content_preview.html\n\nThe provided template will then be used when rendering aliases in edit and preview\nmodes. Also, it does not need to extend your main ``base.html`` template.\n\nHowever, be sure that the required CMS tags and assets are included, for example:\n\n.. code-block:: html+django\n\n    {% load cms_tags sekizai_tags %}\n    \u003c!DOCTYPE html\u003e\n    \u003chtml\u003e\n        \u003chead\u003e\n            {% render_block \"css\" %}\n        \u003c/head\u003e\n        \u003cbody\u003e\n            {% cms_toolbar %}\n            {% block content %}{% endblock %}\n            {% render_block \"js\" %}\n        \u003c/body\u003e\n    \u003c/html\u003e\n\nThis helps you keep the editing interface focused on the alias content instead of\nthe surrounding site layout.\n\n\nA note about versioning\n=======================\n\nIf you enable djangocms-versioning after creating aliases, you need to run the management command\n``manage.py create_versions --userid=\u003cpk\u003e`` to create Version objects for existing alias content.\nSee the `create_versions command documentation \u003chttps://djangocms-versioning.readthedocs.io/en/latest/api/management_commands.html#create-versions\u003e`_\nfor more details.\n\nFor more information about djangocms-versioning, see the `djangocms-versioning documentation \u003chttps://djangocms-versioning.readthedocs.io/en/latest/\u003e`_.\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    :alt: Coverage\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","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdjango-cms%2Fdjangocms-alias","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdjango-cms%2Fdjangocms-alias","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdjango-cms%2Fdjangocms-alias/lists"}