The curiosity came from when I was trying to remove the auto-truncate behaviour from a Promotional Card component, that is setup via the Paragraph Type. After inspecting its corresponding paragraph--civictheme-promo-card.html.twig file, it seems the paragraph uses the SDC civictheme:promo-card directly, without any with statement to assign the variables/slots?

2025-10-02T112447

Adding {{dump()}} statement shows that the variables used by the promo-card component somehow magically, are already in-place:

2025-10-02T113101

So after some digging, I found the place where the variables gets declared:

  1. the civictheme.theme has included the ./includes/manual_list.inc file
  2. the manual_list.inc file have declared a theme hook civictheme_preprocess_paragraph__civictheme_manual_list that will be triggered before any paragraph civictheme_manual_list component loads in
  3. this particular theme hook function calls a series of functions that stares with _civictheme_preprocess_paragraph__paragraph_field__** , which will extract the variables from the content fields of the &$variables.
  4. Taking the field_c_p_title value under content field for example, it will be declared as a separate field title (extracted with the help of civictheme_get_field_value function in utilities.inc)

2025-10-02T105803-optimized