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

How to integrate a render array into a $build (or #pre_process) object?

I have a node content type called Doctor that has a field of what categories they are classified with and another field of what directory nids they should appear. A Directory is also a node content type that has a field for what taxonomy categories it should be looking for to fill its page. It seems to me that within my custom module I can use hook_node_view to change the render array and integrate these Doctor entities under each category. 

Right way to dinamically insert HTML Video

Hello,

I was trying to insert a HTML video tag when the user is on Desktop, and just don't do it if on Mobile, instead of using a Display:none on the video tag if user is mobile.

I was able to write this code, it works, it does insert the HTML Video tag, but for some reason I couldn't firgure out, it's not playing automatically. Even if I click on it nothing would happen.

I know I'm probably missing something in JS code, but I'm not sure what it could be.

The end result is the same as if I would have added the HTML tag on its own, but it's not playing.

Taxonomy re-order issue Drupal 8

In my Drupal 8 site, I have a vocabulary and it has 3 levels of terms under it. First I do 'reset alphabetical' action so that all terms are in alphabetical order. After that when I try to re-order terms using default drag and drop feature, it lost the order of other items too.

Extend OptionsSelectWidget by adding new fields

Hello,

I don't know if it's possible, but I try to extend the OptionsSelectWidget widget to add additional field(s).

My goal is to have only a widget, not a new fieldType + widget + formatter, because I want to change behavior of an existing field added by contribution module.

I created a new widget like this :

Json api normalization cache issue.

I'm altering a page's json output with normalization. Within my normalize function, I'm accepting an argument to alter the returned value, so that each of these would return different values...

ttp://localhost/homepage?_format=json&block=test_2

http://localhost/homepage?_format=json&block=test_1

Ajax triggered by button and checkbox - what is the difference?

In a custom module I am testing the difference between an ajax call triggered by clicking a checkbox versus clicking a "button" type button (as opposed to "submit" button) and I see differences in the rendered form using these two form elements as triggers. Could somebody point me to an information about what are the differences between these two methods of triggering ajax call?

Pages

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