Create / change the content of block via a custom module

Requirements : I am looking for a solution where i can change the content the content of block with my custom logic.

Detail: i am using Paragraph modules one of paragraph type is paragraph block where i can add block which i already created from block layout

/block/add?destination=/admin/structure/block/block-content

there i create a simple block with blank or dummy content.

Views Contextual Filter based on Content field & ID in Drupal 8

How do  implement contextual filter where the results of the view limited to content that has particular field value only. I have the user id context which is working well but the context for fields with specific value is where I'm stuck. Thanks for any suggestion.

Print paragraph index in twig template

I am using paragraph module and create paragraph types as well. I create a content type Quiz where i add paragraph field as reference.

i create a quiz page and create three paragraphs now i want to show index or counter or paragraph on paragraph.html.twig template but i how can i print the counter / index so it gave me

paragraph1

paragraph2

paragraph3 etc

populate fields for content type form OR view

I have fields in my database that repeat for the same answer to the first drop down box.  In other words, based on a drop down box of 20 choices, some fields can be populated with the same answers, or if the choice already exists, those extra fields do not appear in the form because they are not necessary.  We have 20 companies let's say, but 100 deals.  One company may have many deals but the data in the 5 fields is the same for each company (entry).  The list of companies is updated by me manually in the list (text) content types under structure.

Redirect after registration to web form

For registration I have several yes/no questions and based on answers I'd like to redirect users to a web form.  I.e. 

Are you a human?  If the answer is YES - go to 'human' webform.

Are you a plant?  If Yes, go to 'plant' webform.

Drupal Remote Video Youtube CSS Not Working

Hi, I'm using paragraphs, and have setup a content type to use Drupal core's remote video field. The div I wrap the video in is being showing, and has the CSS I'm specifying it, but it's not working. It doesn't appear the CSS I specify does anything except maybe change background colour.

The CSS I'm trying to apply to have the video fit to the size of the container.

It appears maybe the Youtube video has inner HTML which I is overriding my changes, and I don't know how to change the inner HTML because I only see it built on the rendered page.

Pages

Subscribe with RSS Subscribe to RSS - Drupal 8.x