Unanswered Questions

587 questions with no upvoted or accepted answers
4
votes
2answers
213 views

Multiple url aliasses per node in multi language website

Hope this is the right place for this question. I'm turning to you guys because I just cannot decide on the best way to go for this issue. I'm currently developing a multi-language site which is ...
3
votes
1answer
229 views

How to attach a paragraph to a node using node_updatehook?

I am trying to attach a paragraph, to a node. I am currently trying to do it in node_update hook. The value for paragraph will come a custom field. Currently am trying to achieve this with hard-...
3
votes
2answers
434 views

Customize menu local task links

I am looking for a way to customize 'edit', 'view', 'delete' links. I use bootstrap theme, but i use bootstrap v4 styles for it. I want to add 'nav-link' class to each link. And find a way to ...
3
votes
2answers
301 views

Set global data like $user

On my project, I have a custom table for some custom permissions for users. I want all permissions for a user loaded on each page like $user. I created a custom module and set the global variable $...
3
votes
2answers
307 views

Trigger Event After Node Is Indexed

I have a pretty basic Drupal 7 web site with Solr search (works great!). I would now like to perform some "work" after each node is indexed with Solr. First I tried creating a workflow rule but ...
3
votes
1answer
665 views

Using token in page.tpl.php?

I downloaded the social media module and I found this token: [socialmedia:sm-twitter_username]. I want to show it where the Read more / Add new comment section is, under an article. Since I can't find ...
3
votes
2answers
1k views

Conditional token pattern

I am looking for a module or a hook that allow me to use if conditions with tokens. For example I want to check if a field is equal to a specific value or text [if][field_name][eq]hello[then][...
3
votes
2answers
525 views

Changing language in drupal

So my problem is i dont know how to make my custom menu item change language in drupal. I know there is a language switcher in drupal, but i want to make a new custom menu in drupal, theme it, and i ...
2
votes
0answers
58 views

What's the difference between adding a template and overriding a template, from a custom module?

I found a paragraph in the documentation about using template files in a custom module. This way can be even used to override a template like I did here. However, I am wondering if this is the ...
2
votes
0answers
28 views

External CSS file is not being loaded

I added an external CSS to my theme. When I look at the source code the external file is not being rendered. In my html.tpl.php file I have: <?php print $styles; ?> In my template.php. file ...
2
votes
1answer
77 views

Load menu items from one menu in other menu

I want to load the menu items from the main menu in a other menu. I've read a dozen examples but I can't get it to render the items at all. Here's my code from my_theme.theme function ...
2
votes
1answer
5k views

Alter views results in a hook

When I use contextual filters in a view, I can select an option to display a summary when the argument is not present. If I do it, it shows a list of node IDs instead of titles. For example, I get the ...
2
votes
1answer
44 views

Variable passed into a preprocess function has incorrect data or or an unexpected format

I wanted to change some of the forum’s topic's preprocessing. So I copied template_preprocess_forums() into a custom module (myModule), and renamed the function myModule_preprocess_forums(). I get an ...
2
votes
1answer
385 views

Drupal 7: How do I modify the query parameters?

I want to modify query parameters used when accessing a Drupal page. I tried implementing hook_url_inbound_alter(), but it only allows to parse/modify the path, and it doesn't allow any interaction ...
2
votes
0answers
901 views

Change field value with hook_views_pre_render()

I'm using Views in 8.4.0 and attempting to change the output of a field value with hook_views_pre_render(). The default value of the field is a node ID. The intent is to replaced the value with a ...

15 30 50 per page