This forum is for assistance with theme development.

Show multiple content types in a single page with twig

I have few content types such as news, lead story, events. I want to show those content types in a single page (Front Page and some other pages and that pages may content some static HTML content) with some logic using twig template. As an example I want to show one randomly selected lead story and three news items in a single page. How can I achieve this.

Twig template recommendations puts my paragraph in the "fields" folder, not "paragraphs

I know the title may be a bit difficult to understand. Basically, I have created a paragraph type in Drupal that holds a label and a link. Then I have page content that adds it and allows me to make more of them on the back end when building a page. Unfortunately, I want to style them in a way similar to some CTA buttons we already have, but the Twig debugging is saying that my paragraph type is a field, and thus isn't recognized as a paragraph. Could this be a result of a hook somewhere, or have I misunderstood what counts as a paragraph?

Tweaking CSS in Bartik D8

I know this is likely a question so basic that most people will be laughing, perhaps even chortling.  But I come from a non-CMS background where to increase a font, say, or choose a different font-family, one simply navigates to the whatever.css file and finds the right line and changes it.  It's usually quite easy to read, too.

I am kind of blown away at the difficulty of doing something as simple as identifying the title of my Bartik page and changing its color.

Insert custom js in drupal 8

I want to insert in bootstrap theme some js effects, I did everything like in the article: https://www.drupal.org/docs/8/theming/adding-stylesheets-css-and-javascr... #Attaching a library to all pages, but my script I do not see it in the source page:

my files:

*.libraries.yml

View with contextual filter : Get taxonomy name

Hello, I wish to rewrite my vew like this.

/property/villas/paris/
/property/apartments-duplex/paris/

the first is a property category and the second is the city

I would like to display the name of my category and the city in the title of my view

Villas in Paris
Appartement and Duplex in Paris ....

Can you help me please because I'm stuck

Thank you

CSS redundant code

Hi,

I would like to know of a process or software that can check through my drupal site and through my css file in my bootstrap sub-theme and highlight all the css that is no longer used in the site. I have 4000 lines built up over years and probably half of that is no longer needed.

Pages

Subscribe with RSS Subscribe to RSS - Theme development