This forum is for module development and code related questions, not general module support. For general support, use the Post installation forum.

pass extra variable to twig

I need to pass extra variable to twig, below code loads 'weekView' twig file where I can access node of $week_id but need to access $image_path as well.

$week_id = $dynamic_week_id; //comes from different node
$image_path = $dynamic_image_path; 

 $view_week_key = [
            'content',
            'this_week_wrapper',
            'this_week',
            'value',
        ];

$form_state->setValue($view_week_key, "<p>[mailchimp_campaign|entity_type=node|entity_id=" . $week_id . "|view_mode=weekView]</p>");

  

Passing field to content type from custom form.

Please close the issue as I have resolved it.

Building form with entity reference and view (D8)

I've been trying to build a form referencing an entity using an entity reference view. The general purpose is to allow more fine-grained filtering for this form and other module forms than supplied by the standard entity_reference handler, without having to build a plugin or use hook_query_alter.  Though I am definitely open to such suggestions (esp. with pointers to good detailed documentation) - I am using entities and it seems some such docs are for nodes.

Here's the methodology I followed so far, with some notes along the way.

Content moderation select list

Hello,

I want please to alter the action executed after selecting a moderation state from the content moderation field widget.

I have the field widget of content moderation set and it is displayed as a select list.

I would like to alter the action executed after selecting 'deleted' (for eg) and saving the node.

How can I achieve this please?

Thank you!

Drush installation

Hello everyone, I am new to Drupal. I am using Drupal 6. I find it hard to get proper documentation on drupal. can anyone say how to install drush in drupal 6?  I am using Windows 7 and wamp.

Rebuild form table with empty rows

How might I go about rendering an empty table after a table with rows has been rendered.

For Example in buildForm:

Pages

Subscribe with RSS Subscribe to RSS - Module development and code questions