Aliases

Note

This section only applies to installations such as the django-cms-quickstart project which use the djangocms-alias package.

Some content belongs on many pages at once: a footer, an opening-hours block, a contact panel, the banner announcing this month’s campaign. An alias is such a piece of content, kept in one place of its own and displayed wherever you need it.

One place to change it

Without aliases, content that appears in five places exists five times. Keeping the copies identical is manual work — the kind that is done on four pages and forgotten on the fifth, which then quietly goes out of date. The more places are involved, the more certain it is that they will drift apart.

An alias replaces those copies with references. The content lives in the alias; every page that shows it points at the same thing. You edit the alias, publish it, and every page follows immediately. You never have to remember which pages were involved, and you cannot miss one.

Aliases are content like any other: they hold a tree of plugins, you edit them in the structure board, they are versioned, and your changes only become visible to visitors once you publish them. A page can show an alias through the Alias plugin, and your site’s template may also place one — a footer, typically — on every page at once.

When to use an alias — and when to copy

Use an alias when the content must stay identical everywhere it appears, and a future change should take effect everywhere at once: footers, contact blocks, legal notices, campaign banners. One edit, published once, updates every page.

Copy the content instead when the places are meant to evolve independently: a page that starts from the same building blocks but will be adapted to its context. A copy gives each page its own content; an alias would couple pages together that should not be coupled — an edit intended for one page would silently change all the others.

A useful test: “If I change this next month, should every page change?” If yes, use an alias (see Reusing content with aliases); if no, copy.