osman
  • Member for 5 years, 6 months
  • Last seen this week
How to configure Trusted_Host_Settings for subdomains?
6 votes

It's actually documented in settings.php file as in examples: Drupal 8.5.x https://cgit.drupalcode.org/drupal/tree/sites/default/default.settings.php?h=8.5.x#n712 <?php $settings['...

View answer
How to set or change path to Drupal 8 contact form?
Accepted answer
6 votes

I also needed a page at /contact path. With a simple custom module you can change the default routing for the contact forms. Let's assume custom module is called: example and the new default for the ...

View answer
Lazy Load inline images in Drupal 8
4 votes

When you need to lazy-load inline-images, I'd recommend doing that so via Filter plugin system. That way you wouldn't need to alter any of the HTML in the node body/content. The filter would be ...

View answer
Override labels in REST Export view
Accepted answer
3 votes

In your view's row style options you can rename any exposed field's label. The form labels those fields as alias. This is screenshot from another view I was working on, but should give you an idea.

View answer
Drupal 7 - Node specific template not working
2 votes

If you haven't already done so, I'd recommend enabling theme debugging feature of Drupal 7. In the settings.php file, or preferably in settings.local.php file if you have one, add the following line, ...

View answer
How to add Vue.js validation attributes to input elements?
2 votes

I suppose you only want to add Vue specific attributes to certain form elements, not every single one of them (including admin/backend forms). Presuming you are using Drupal 8, I'd recommend enabling ...

View answer
8 - Is It Possible To Create Routes Through The Admin
Accepted answer
2 votes

You may want to check out the Rabbit Hole module. Rabbit Hole is a module that adds the ability to control what should happen when an entity is being viewed at its own page. Perhaps you ...

View answer
Create a Json view of the user, with the format of the user/login response
2 votes

When you query /user/login it defaults to currently logged-in user. I suppose you need to create a view with a "REST export" display. The view defaults to "Entity" row style, change it to "Fields". ...

View answer
How to make https links available to anonymous when new article is published?
2 votes

Assuming both secure and non-secure websites are in fact the same Drupal instance, there are a few possibilities which may cause the issue you are experiencing: Web server; configuration differences ...

View answer
How to get the administrator role id to assign new permissions?
2 votes

Consider that the administrator role may have a different name than administrator or may have a different role ID. Drupal 7 has a configuration available at Account Settings page: Administrator role ...

View answer
How to create search indexes by path in Drupal 8?
Accepted answer
2 votes

I was able to resolve the issue by using the Views, not through the search indexes as I initially thought was the path for a solution. Created a required field for the content-types that would be ...

View answer
How do I include a CSS library in my custom module?
1 votes

More likely your vendor directory is off of the web root. Could you confirm that? If you by any chance using drupal-composer/drupal-project project, it would have a folder structure like this: /...

View answer
How can I include Google Structured Data via a module?
1 votes

There is a Drupal 8 module works tandem with the Metatag module: Schema.org Metatag From the module description: This project extends Drupal's Metatag module to display structured data as JSON LD ...

View answer
Reusing existing content types for very similar content
1 votes

You could use one content-type and as many fields needed to define all the unique features of each transport type. Obviously, not all the fields will make sense for all type transports at that point. ...

View answer
ABT term reference field hidden in Node View
Accepted answer
1 votes

Make sure to assign "Allow users to view ABT terms on node page." permission to desired roles.

View answer
Problem creating redirect from page with %20
1 votes

If you are using the Redirect module it has an admin page for fixing 404 errors with redirects. Your file should be listed there since it gives you a 404 error. When clicked on "Add redirect" action ...

View answer
sitemap for users not search engines
1 votes

Easiest way perhaps using the Main menu block and displaying them at the sitemap page's content region. If you already have the Menu Block installed, it'll give you more flexibility configuring how ...

View answer
how can we limit the node view to a particular limit in drupal 7
1 votes

You can implement hook_node_access() in your custom module, and check how many of nodes from a certain content-type the user has visited. For example: <?php function YOURMODULE_node_access($node,...

View answer
How to generate iframe from Drupal 7 view (custom blog) with security token?
1 votes

Pretty sure there are many ways to accomplish this, however seems to me the easiest method would be creating a custom module. This simple module would be responsible for creating a dedicated path for ...

View answer
One view per taxonomy vocabulary without a contrib module?
1 votes

Drupal 8 already uses the (now-builtin) Views for listing pages of content belonging to a certain taxonomy term. That's a single view for all taxonomy terms: You can edit the view and make necessary ...

View answer
Apply text filter (not text format) in Twig
0 votes

If those HTML are mostly or all static, you could consider implementing your own tokens via hook_token_info() and hook_tokens() in your custom module. This way, you would avoid any potential risks, ...

View answer
Install multiple apps on a Bitnami stack
0 votes

This is not a direct answer to your question. If it wasn't long I'd post it as a comment. Since you mention configuring a server is not your forte, I'd like to recommend you and other Drupal ...

View answer
Lazy load with inline images
0 votes

I realize this is an old question, but I think this may help others with the same issue. I recently contributed a module to Drupal community for lazy-loading inline images (and iframes). Once the ...

View answer
Add an extra class to views exposed filter “select” if default option is selected
0 votes

Change the selector and class name to your needs, but this should work. (function ($) { $("select") .change(function() { if ($(this).val() === $(this).find('option[selected]').val()) { ...

View answer
Creating content with content type: only Title is displaying on first click not the other fields
0 votes

If the previous two answers don't apply; Third possible solution might be related with Conditional Fields. Make sure to check all fields for their settings. Check if any of them has conditions ...

View answer
Creating content with content type: only Title is displaying on first click not the other fields
Accepted answer
0 votes

Make sure you rebuilt the permissions first. If the issue still exists, first check the permissions at /admin/people/permissions page. If the desired roles don't have required permissions for those ...

View answer
True/False exposed Views checkbox for Computed Field
0 votes

Change exposed computed field's filter type to "Grouped filters", Widget type to "Radios", Check "Allow multiple selections" checkbox, Expose one option equal to 1 with your choice of label See ...

View answer
Exposed filters and taxonomy. How to make a redirect to a term page when exposed form submit?
0 votes

I have a slightly different solution. Hope this helps too... You can have as many taxonomy categories as you need as exposed filters. Each vocabulary may have different pathauto patterns. Other ...

View answer
How can I programmatically populate a drop-down list field's options?
0 votes

Check out hook_options_list() to dynamically populate available options.

View answer
Add image field or other fields from node to a custom Block in Drupal 8
0 votes

You can use Field as Block module for that scenario. I often use it to place the node content in one region, and node image in another -as a dynamic block.

View answer