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

toc_js module not returning table of contents

I am using the toc_js module to load a table of contents at the top of a content node. Currently experiencing a problem in the container is rendering on the page but non of the headers <h2> - <h4> load. I have attempted to debug this in the wiziwig and in the module but have had no luck. This is the user experience right now. Does anyone have experience debugging this issue and/or know what to do here?

How to use hook_views_post_render function to make changes to rendered view?

I have got a view showing a table of rows of records. I want to change some table cell values after the view is rendered. So I thought hook_views_post_render is the hook I should implement in my module. I tried to change the cell values and they changed inside the implemented function ... however on the html page output I still see the old strings.... Means the changes I made have vanished.

I was/am under the impression that since the signature of this function is ...

Keep Russian characters in url

Hello,
i am wondering how to keep Russian characters in the url alias that is generated by Drupal.
ex.

Спорт и природа

alias generated is = /sport-i-priroda
but i want to keep
/Спорт-и-природа

Any idea ?

<link ... as="image"> gets removed always

Whether I put it in page.html.twig or writing a preprocess function, 

<link rel="preload" media="(max-width: 576px)" href="/themes/custom/mytheme/images/header-576.webp" as="image">

gets removed completely from the page source.

Only when I remove the as="image" the line is, of course without it, in the page source.

Drupal Exposed Field: Expose list of all the content name to use as a filter

I have two content types (User and Company). 

Content Type Info Image

I want to create a filter that allows users to search by company name. Currently, the company field is a text field, but I want to list all companies as checkboxes.

Is there a way to do this in Drupal 10?

How to change link text in a view ... to another field value?

I am running a Drupal site since Drupal 4 days.............It got upgraded from Drupal 7 to 8 successfully and now it is running Drupal 10.

Before Drupal 8 I was having a block showing recent comments as table with 1. comment subject, 2. author, 3, node title and 4 date-time as fields. I had put code to change the node title to an alternate title (say title_mf which I have in a different table with additional/alternate data for nodes ... node_alt_data)

Pages

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