Still on Drupal 7? Security support for Drupal 7 ended on 5 January 2025. Please visit our Drupal 7 End of Life resources page to review all of your options.
I maintain a module that provides a block with a wall clock embedded – Wallclock. The clock is mainly created in a file called templates/wallclock.html.twig, which consists of some SVG to create the clock and hands. In this template I've put placeholder for some text, which shows as "This string should be placed just below the clock face." This is how in currently looks if the block with the block is placed inside the main content region:
When browsing the page of [Parent_A], the menu I want to display in the sidebar is:
This is the same when displaying the page of [Child_A1] or when displaying [Grandchild_A1-1].
I have a content type with 4 fields namely title, body, image, and position, my goal is to set the placement of these fields based on the value selected in the position field e.g. if the value of position is set to 'left' the image is to be shown on the left and the title and body should be shown on the right and vice versa I created a view using all these fields now I want to use the HOOK__views_pre_render to get the value of the position field, and based on that set the position of the elements as given in the example