Checking for html string quantity in a field item

i have a custom field template "field--my-field.html.twig" in there i am displaying the content on the field like this:

<div{{ item.attributes.addClass('field__item') }}>{{ item.content }}</div>

what i want to do is check the rendered html for the quantity of <p> tags that are present and if i have more than one <p> tag add a class to the parent.

this is how i picture it but this code is not real:

visual look of page changes when logged out

To start with, I'm a very new user... not familiar with much of Drupal terminology... know nothing about php

So I have been trying to modify a theme to get it to look just like i want it to. So i have made some edits to the css file and making a little progress. But what is happening now is that page appearance changes depending on whether you are logged into the site or not. Appearance changes again when editing or creating new content.

Resizing blocks

Hello all,
I've been kind of learning Drupal myself for the last few weeks and one thing that I would like to accomplish is to resize the logo block on the top header of the website.
The website theme is Zircon 8.x-0.0-rc1 (default theme, admin theme).
The block containing the logo for the website is under the Header region. There are no options to "edit" the code for this block. You are, however, able to edit the html for bodies of text. Is there an easy way to do this, other than having to go through a server directory to edit the CSS sheets etc.?
Thanks!

Single use content type

Hi,

Maybe I'm missing something, but is there a way to specify a single use content type? For example, a cms site for a business might want a "contact info type" but would only require a single use of this that they could modify if they move or change contact info. There is no need to make multiple nodes for the "contact info" content type, only to edit this single node. Any thoughts?

Thanks,
J

How to display current date and time in header

Hello,
I would like to display the current date and time in the header section.
I read this https://www.drupal.org/node/521844
and this https://www.drupal.org/node/199982
but the there is no information regarding D8
Any suggestions?
Thank you.

Whatever happened to backlinks in Views?

Back in Drupal 7 there used to be a standard disabled View called "Backlinks" which used "Search: Links to" as the contextual filter. In Drupal 8 both the Backlinks view and the "Search: Links to" and "Search: Links from" contextual filters seem to have disappeared. Does anyone know why, and whether they are coming back?

Pages

Subscribe with RSS Subscribe to RSS - Drupal 8.x