Drupal Written by Ben Marshall |
Have a few menus on your site & looking for a quick way to add or change the menu classes and attributes? Use the
theme_menu_tree__[menu_name]
override.theme_menu_tree__[menu_name]
override.Have a few menus on your site & looking for a quick way to add or change the menu classes and attributes? Use the theme_menu_tree__[menu_name]
override.
Quit loading every theme CSS and JavaScript file in Drupal 7 and learn how to load CSS & JS files based on conditionals like URLs, node types, modules, views & more!
Create Drupal 7 menu links with empty titles! With Drupal’s hook_menu_link and <none>, create icon links & other styled links that have no text.
You made the switch from drush to drupal console, but now pulling your hair out because none of the drush commands work using drupal. Spare your follicles and use this list of Drupal 8 console commands.
Need an array of user roles in your Drupal 8 site? Say goodbye to user_roles(), say hello to user_role_names(). This function will return an associative array with the role id as the key and the role name as the value. For more information, see https://api.drupal.org/api/drupal/core!modules!user!user.module/function/user_role_names/8.2.x.
Looking for how to create new module permissions in Drupal 8? Look no further, $module.permissions.yml to the rescue! In Drupal 8 permissions are now defined in $module.permissions.yml file instead of using hook_permission(). Drupal 8 Static Permissions Create a new file in the root of your module folder and name it my_module.permissions.yml. [php]# In my_module.permissions.yml file. […]
👋 Howdy! My name is Ben Marshall & I’ve been developing websites for over 20 years. I specialize in WordPress development, SEO strategy & LOVE what I do. Familiar with CSS-Tricks? … you should be, my site’s design was heavily inspired by it — hope you like it.
I build websites for both small mom & pop shops to large Fortune 500 companies. In addition to freelance work, I also have a full-time position at the New York-based Entermedia agency. Need a site, help with an existing one or a boost in search engines? I’m your guy, contact me today!
Are you a non-profit or organization helping the community and in need of a site? I offer heavily discounted services — sometimes free — to worthy causes.