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.
theme_book_title_link() (http://api.drupal.org/api/function/theme_book_title_link/7)
We have a theme function that makes a block title a link. Clearly this indicates a lack of functionality in block.tpl.php that's needed and should be addressed.
This theme function needs to be removed and the functionality that it is enabling needs to be standardized.
Similar Issues
Comment | File | Size | Author |
---|---|---|---|
#15 | core-remove_theme_book_title_link-1833876-1.patch | 1.65 KB | jenlampton |
#11 | 1222248-remove-theme_book_title_link-11.patch | 2.46 KB | andypost |
#9 | drupal8.theme-book-title.9.patch | 1.68 KB | sun |
#7 | drupal8.theme-book-title.7.patch | 1.68 KB | sun |
Comments
Comment #1
JacineMaybe we should just add the link in a preprocess function and call it a day.
Comment #2
RobLoachI was really confused as to why we added like 10 of these different link theming functions that did exactly the same thing. Decided to stay out of that conversation. In any case, I'm a +1 here.
Comment #3
Jacine@RobLoach Do you know of anymore that are lurking around? Let's kill them too. :)
Comment #4
JacineIn an effort to get a better picture of issues remaining in the HTML5 Initiative, we are removing the "html5" tag from issues that are not directly HTML5-related. Tagging this "theme system cleanup" instead because that's more accurate.
Note: Any issues assigned to the "Markup, CSS and JavaScript" components will still be broadcast on the HTML5 Twitter feed so that interested parties are aware and can participate.
Comment #5
andypostsuppose a lot of elements could be rendered with theme_html_tag() so removed also this reduce a theme registry
Comment #6
RobLoachhttp://api.drupal.org/api/search/8/_link?page=1 ... But the book one is the most obvious.
Comment #7
sunLike this?
Comment #9
sundoh, sorry.
Comment #11
andypostSuppose we need to change a theme_link() to safely check $options['html]
Comment #12
sunIt's possible that I'm mistaken here...
The link in $data contains the menu system information. I'm not sure whether that is compatible with theme_link() -- e.g., I think it contains a 'href' attribute (whereas 'path' is the original router path), and 'options' might not exist.
Let's make sure that we're working with the right data ;)
Comment #13
vlad.dancerWe don't need to remove theme func., mentioned here How to convert theme functions to Twig templates
#12 sounds like very reasonable, we need add preprocess func and do 'href to path' staff there.
Comment #14
jenlamptonI think we should remove this theme function. Also tagging for twig.
See similar issue #1595614: [meta] Remove all the theme functions and templates in core that simply output a link. Replace with #type 'link' render arrays
Comment #15
jenlamptonThe function theme_book_title_link() exists in book module for the sole purpose of adding a class, book-title, to the link in the subject of a block.
As it turns out, this class is never used. Let's remove the class, and the function it rode in on! All we need in book.module is a call to l if we remove the useless class. Removing the need for this theme function at all.
Comment #16
jenlamptonupdating title
Comment #17
sunThat makes sense in this case, since the link is actually output as the title of a block. The block provides sufficient context to theme the link in the block title already.
Comment #18
Fabianx CreditAttribution: Fabianx commented+1 for RTBC
Comment #19
catchYep, can't see a good reason for this either. Committed/pushed to 8.x. This probably needs a change notice, or adding to an existing one documenting theme functins
Comment #20
tim.plunkettAdded this to http://drupal.org/node/1795832
Comment #21
jenlamptonwoot!
Comment #22.0
(not verified) CreditAttribution: commentedUpdated issue summary. Add similar issue