Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

184
Visualizações
Django CMS simple placeholders outside of cms

I have a fully developed Django app and decided to add DjangoCMS to give a content developers a quick way to prototype landing pages etc. It now lives under myurl.com/cms and works quite well. The guys can create new pages, choose a template and add plugins there.

When i saw the placeholder template tag I immediately thought about placing it all over the project, outside the cms, everywhere I want the product team to be able to quickly add and change content. I don't want them to create a new page for this from the cms because maybe the site has complex functionality which is only used once in this context (i.e. the search page).

So basically I expect to have static placeholders that I can place in the html part of the page using the cms plugins template tags.

I already found Placeholders outside the CMS in the DjangoCMS docs. But for this to work I have to grab the related placeholder object for every view that renders a page, which would increase the amount of work to "quickly add a placeholder for this text" considerably.

Is there an easy way to do this? I kind of expect to not be the first to have that issue.

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

There's three types of placeholders:

Page placeholders - Declared using {% placeholder %}. These can only be used inside a cms page.

Static placeholders - Declared using {% static_placeholder %}. Not bound to pages or objects.

App placeholder - Declared in your models.py using PlaceholderField and rendered in template using {% render_placeholder %}

The rule of thumb is, if you're rendering a cms page, use a page placeholder, otherwise depending on your use-case use a static placeholder.

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda