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

How add a background image visible in the header and body ??

Hi guys,

On my site I would like to add an image in the header and body of my homepage but once programmed I would like to be able to control the image via an image field in my "Homepage" content type and be able to change it without going through the code.
Currently, I'm just managing to add an image in the 
<div class="image-back>
</div>

image-back{ background :url(...)...}.

but it doesn't take into account the full width of the
I tried with the preprocess, moving the head block into bloc body...

How do I add 'beforesend' code to an ajax call

I have an ajax form which works well.  It uses the ajax below to make the submit button update the form:

          '#ajax'       =>
            [
            'callback' => '::ajax_callback',
            'wrapper'  => 'my-container',
            ],

How do I add 'beforesend' functionality to this definition if for example, I want to update the background color of the submit button before the ajax call is sent?

Thanks.

Define a 'beforesend' for an ajax call

I have a very simple form.  The submit button make as ajax call defined below to update the form.  All works good.

          '#ajax'       =>
            [
            'callback' => '::ajax_callback',
            'wrapper'  => 'my-container',
            ],

how to count the number o content when two entity reference are the same

Hi, I'm creating a module to create alerts about student absences I have 1 type of content called attendance that has

fields title, field_student (reference to content type student), field_subject (reference to type of content subject) and a field to know whether or not it was a list of integers I need to count how many absences each student has per subject and create another type of content that will be alert I appreciate any idea in advance

Call to undefined method stdClass::id() in TranslationLanguageRenderer -> preRender()

I'm getting "Error: Call to undefined method stdClass::id() in Drupal\views\Entity\Render\TranslationLanguageRenderer->preRender() (line 91 of core/modules/views/src/Entity/Render/TranslationLanguageRenderer.php)." whenever I go to admin/structure/taxonomy, edit the Department vocab, and then try to click on one of the terms.

If I click the edit button next to the term, it lets me make edits and save fine but whenever I try to click on the actual term or try to use the term id in a view, it gives me that error or completely breaks the view.

Why hook_entity_update doesnt work if I masquerate as translation_manager

Why hook_entity_update doesnt work if I masquerate as translation_manager

if I login as administrator everything goes well, but as translation manager this hook never triggers

this is happening in translation jobs when I select more that one language and I click on the checkbox "Submit all 2 translation jobs with the same settings".

why?

any Ideas?

Pages

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