P
P
Polina Emelyanova2017-04-18 08:46:52
CMS
Polina Emelyanova, 2017-04-18 08:46:52

How do you set identifiers for internal pages if the layout is written under the CMS?

Hello colleagues!
Please share your experience on how you write modifiers and work with modified blocks.
SUBJECT: there is a multi-page template in which, let's say, there is a certain div.container (wrapper), which is on each page, but on the inside it, let's say, has a border or background.
In this case, I write something like this

<div class="container"> - основной вид</div>
<div class="container container--inner flex"></div> подвид, для внутренних страниц + родитель для ФБ итемов

Or there are sliders. But on the muzzle it is full width, but inside it shrinks and an additional wrapper is required so that its controls do not disappear (I don’t know if I explained it clearly, but I constantly encounter this). Does the need to add this additional wrapper interfere with the "stretch". All classes are all arranged.
Maybe I'm boiling in vain, but because there is not enough time and effort to "dive" into the backend, please clarify:
QUESTION: What is the best and easiest way to implement such changes for subsequent work with the template? Give modifiers? Or work in a cascade from the parent class, for example, a site wrapper or body in general?
Thank you very much in advance for your opinion!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Andrey Khokhlov, 2017-04-18
@andrhohlov

BEM, modifiers, that's all

A
Alex Glebov, 2017-04-18
@SkiperX

cms assembles a page from blocks separately,
but what if you need to assemble another page based on your layout?
nesting is generally bad, the behavior of the block depending on the wrapper is also bad.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question