{"id":14530,"date":"2024-05-16T16:46:46","date_gmt":"2024-05-16T10:46:46","guid":{"rendered":"https:\/\/shra.ru\/?p=14530"},"modified":"2024-05-16T16:47:11","modified_gmt":"2024-05-16T10:47:11","slug":"kak-dobavit-css-klassy-v-attributes-twig-drupal","status":"publish","type":"post","link":"https:\/\/shra.ru\/2024\/05\/kak-dobavit-css-klassy-v-attributes-twig-drupal\/","title":{"rendered":"\u041a\u0430\u043a \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c css \u043a\u043b\u0430\u0441\u0441\u044b \u0432 attributes (twig, Drupal)"},"content":{"rendered":"\n
\u041f\u043e\u0440\u043e\u044e \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0432\u043e\u0438 \u043a\u043b\u0430\u0441\u0441\u044b \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e attributes \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u0430 (\u0432 twig).<\/p>\n\n\n\n\n\n\n\n
\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f attributes<\/em> — \u044d\u0442\u043e \u043e\u0431\u044a\u0435\u043a\u0442 Drupal\\Core\\Template\\Attribute<\/em>. \u0423 \u043d\u0435\u0433\u043e \u0435\u0441\u0442\u044c \u043d\u0443\u0436\u043d\u044b\u0439 \u043d\u0430\u043c \u043c\u0435\u0442\u043e\u0434 — addClass().<\/p>\n\n\n\n \u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f:<\/p>\n\n\n\n \u041f\u043e\u0440\u043e\u044e \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0432\u043e\u0438 \u043a\u043b\u0430\u0441\u0441\u044b \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e attributes \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u0430 (\u0432 twig).<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[163,137],"acf":[],"yoast_head":"\n{%\nset classes = [\n term.bundle|clean_class,\n 'taxonomy-term',\n]\n%}\n\n<div{{ attributes.addClass(classes) }}>\n ...<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"