Vaibhav Jain
Vaibhav Jain

Reputation: 5507

How to customize static_placeholder html code in django cms

I want to customise the HTML for static_placeholder.

Html Code:

<ul class="top_list">
  <li class="spc"><span class="ion-ios-telephone"></span> Call us: {% static_placeholder 'call_us' %}</li>
  <li class="spc"><span class="ion-android-mail"></span> Mail us: <a href="mailto:{% static_placeholder 'mail_us' %}">{% static_placeholder 'mail_us' %}</a>
  </li>   
</ul>

<div class="cms-plugin cms-plugin-1"><p>+91-95578XXXXX</p></div>

this what cms is rendering as the theme is expecting <span> and cms is rendering <div> layout is distorted .

Upvotes: 0

Views: 94

Answers (1)

petr
petr

Reputation: 2586

This seems as a snapshot from the edit mode, when the CMS inserts <div> tags around content to enable front-end editing.

As a first step, publish the page and preview as anonymous user (log out or use incognito mode). If the problem is no longer there, then it was due to the editor.

I would recommend designing the CSS in a way that it is not thrown off by insertion of the <div> tags, however, if this poses a large problem you may remove {% cms_toolbar %} from your template - however, this then removes your ability to edit the page.

Upvotes: 1

Related Questions