Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By hstoellinger on
Hello,
I would like to create an animated menu for my site "https://www.rainer-regimentsmuseum-salzburg.at". There is a (single-level) menu item "News/Information" on the right side of the menu bar that I simply want to "blink" when there is something new that should be drawn to attention. My menus are based on Superfish, my theme is (still!) a subtheme of Bartik. Anybody who can point me in the right direction?
Regards,
H. Stoellinger
Comments
Create a page preprocessor
Create a page preprocessor hook and check say if you have node type news and if it was say updated or created 7 days ago then set a variable true/false and pass it to the template and set a class for the menu item which you can style with css.
Animated Menu item
Thanks a lot! I am not deeply into coding, but there is a discussion of preprocessor hooks in Sipos' book. I'll see how far I get.