Homepage
Main navigation
Main content
Additional information
October Tricks
Login / Sign up
Quality Guidelines
About
GitHub
Propose new content
October CMS resources and help articles
Simple and to the point. Optimized by the community.
×
Login / Sign up
Quality Guidelines
About
GitHub
Propose new content
Edit trick
Changes will be published after manual review
Title
Give your trick a describing title. Do
not
start with «How to...».
Your trick
Keep it short and concise! Markdown is supported.
You may be having troubles when you try to render Static Pages plugin's content if you are using Bulma, or other CSS Framework instead of native Bootstrap one and a WYSIWIG widget in your admin panel. Because Bulma, and perhaps some others CSS Framework, by default, overrides all the default style: `p` paragraphs `ul ol dl` lists `h1 to h6` headings `blockquote` quotes `em and strong` `table tr th td` tables All these tags will appear like any other `span` or `div`! Without any style. When you render static pages in your layout, you probably use the twig tag `{% page %}` which renders both CMS page and Static Page plugin's page. CMS will render as you want, but not static pages, which will be rendered without any style. As said in [Bulma documentation](https://bulma.io/documentation/elements/content/), you should use the `div.content` tag, but if you do so: ```HTML <div class="content"> {% page %} </div> ``` All the CMS page will be rendered without Bulma styles, which is not what you want if you used Bulma to design your pages. The way I do, which works perfectly is this tricks to avoid the CSS framework's reboot only in static pages content: ```HTML {% if staticPage.content is empty %} {% page %} {% else %} <div class="content"> {% component 'staticPage' %} </div> {% endif %} ``` This way you can render any HTML tag with native style, or with Bulma styles: ```HTML <h1>Native HTML Style</h1> <h1 class="has-text-primary">Bulma style</h1> /* Will be primary-colored */ ```
References
Add additional online resources to your trick
×
Name
URL
+ Add reference
Topics
If your trick fits more than one topic select multiple. Select at least one.
Backend
Plugin Development
CMS
Twig
Themes
Deployment
Tags
You can use existing tags or create new ones. Add at least one.
Submit for review
Cancel
We use cookies to measure the performance of this website. Do you want to accept these cookies?
Accept
Decline