Visual Studio Code is my new IDE love. It's simple, lightweight but brings great functionality. One little problem was that when double-clicking a variable with a dollar-sighn ("$") (for example in PHP or JavaScript) not the whole $variable
Snippets
Ein typisches Problem im Umgang mit AJAX ist die (re-)Initialisierung von Scripts auf den nachträglich geladenen Inhalt. Im JTL-Shop 4 stößt man darauf beispielsweise auf Kategorieübersichten bei der Seitennavigation. Viele Systeme, viele
Simple snippet to only output the first image of an imagefield in a view and show the rest of the gallery in the photoswipe overlay. Hint: Don't forget to add the photoswipe-gallery class on the field wrapper in views settings: http://cgit
Little Drupal 7 snippet for the image_link_formatter module (https://www.drupal.org/project/image_link_formatter) to add a fallback to lightbox in size large if no link is given. Should work the same with other fallbacks (colorbox, etc.)
I just had the case to iterate over EntityReferenceRevisionsItem's which are similar to EntityReferenceItem to get the target entities, My code snippet was (WRONG EXAMPLE):
When using HOOK_node_view() you should take care because when the search (Search API especially) is indexing, this hook is also being called. You can not rely on a user displaying the node display currently. Here's a way to ensure this...
I had the requirement to check the equality of addresses in customer orders (billing / shipping) and wrote two helper functions for that. Perhaps you'll run into the same demand one day. Then please leave a comment here and in the original
Use this simple snippet to embed a view in code and only display it if the view has at least one result (prevent rendering empty views markup):
Dir hat dieser Beitrag Zeit und viele Nerven gespart?
Dann würde ich mich sehr über einen leckeren Kaffee freuen! Oder ein spannendes Tech-Buch aus meiner Wunschliste?