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

How can you access Breadcrumb Links without doing it in a preprocess?

Hi Everyone,

I am trying to access all the links in the Breadcrumb outside the preprocess function. Seen many posts and examples regarding removing or adding them in a service. So far nothing that helps in getting only the links. Anyone have a suggestion?

How to save HTML tags in custom form using Rich text editor

Hello Team,

I am trying to create a custom form with format "basic_html". With this I can see Rich Text editor. When i am trying to get the HTML tags in form submit i can get only text . 

  $form['body'] = [
      '#type' => 'text_format',
      '#format' => 'basic_html',
      '#allowed_formats' => ['basic_html'], 
      '#required' => TRUE,
      ];
 
In form Submit :

    $body = $form_state->getValue('body')['value'];

$body does not return HTML tags from editor

Please help me with this issue.

Adding menu links by using hooks

Hello,
I tried to set links to the user (front)-page using this code in the module the "custom_simple_menu.module" file in my module structure. Uunfortunatelly no link appears. 
What do I have to change in the code?
Thank you
Peter Winkels

 

<?php

/**
 * @file
 * Contains custom simple menu module.
 */

/**
 * Implements hook_menu_links_discovered_alter().
 */
function custom_simple_menu_menu_links_discovered_alter(&$links) {

Showing Status Report for a user with custom rights

Hi, 

I am trying to show the Status Report to a user with custom rights. I can see the admin/reports/status page for the user I want to set the rights too. 

Controller:

Getting Image URL from FileFieldItemList (Drupal 10.2.6)

Hello,

I have custom content-type with 'image' type field. I want to render it into my custom block (by adding my own <a href> and <img> path). The problem is that I'm lost on how to get the URL to the image. Here's what I've tried:

config splits and drush cex

Hi,

I am working on a project that shares some content types with another project.  I have configuration splits set to include content types for my project. This has been working fine until recently.

I created a branch and ran a drush cex to view the files I would be exporting.  They all looked good.  Then, after I said 'yes' to the prompt: The .yml files in your export directory (/var/www/html/config/default) will be deleted and replaced with the active config. (yes/no) ive config. (yes/no) [yes]".  There are over 150 files that are similar to this:

Pages

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