I constantly use the Form API page to answer the question "What's the specific name of the form element (if any) that does X, and how do I use it?" But a close second in terms of usage would be "Is there a (non-form) themed element that renders something like X, and how do I use it?" In other words, I'm looking for a theme('something', ...) function, where I'm not sure what the exact name of 'something' would be.
I was reminded of this with recent work on https://github.com/backdrop/backdrop-issues/issues/3292, where @klonos pointed out that indentation elsewhere used class="indentation", and a subsequent raw code search for 'indentation' led to the theme_indentation() function, which was exactly what was needed. It occurred to me, though, that it would be nice to have a browsable/filterable table of all of the theme_* functions on the docs site.
(I realize one can use the autocomplete function name search using theme_something, but that only returns the first 10 possible matches and it doesn't help if the themeable object you're seeking doesn't start with the letters you're entering in the autocomplete field. One can also use the Functions page, but that returns lots of non-theme matches to wade through.)
So, I threw together a quick View on my local, which looks like this:
What do people think? If you'd like to see it for real, I can easily put it on the docs site to try out (it's a standalone View, so easily removable/modifiable if we subsequently decide we don't like it).
I was also thinking it would go well just above the "Form API Reference" entry in the menu; Theme Functions is a guide to all of the themable objects, and Form API Reference is a guide to the related subset that go into forms.
I constantly use the Form API page to answer the question "What's the specific name of the form element (if any) that does X, and how do I use it?" But a close second in terms of usage would be "Is there a (non-form) themed element that renders something like X, and how do I use it?" In other words, I'm looking for a
theme('something', ...)
function, where I'm not sure what the exact name of 'something' would be.I was reminded of this with recent work on https://github.com/backdrop/backdrop-issues/issues/3292, where @klonos pointed out that indentation elsewhere used
class="indentation"
, and a subsequent raw code search for'indentation'
led to thetheme_indentation()
function, which was exactly what was needed. It occurred to me, though, that it would be nice to have a browsable/filterable table of all of thetheme_*
functions on the docs site.(I realize one can use the autocomplete function name search using
theme_something
, but that only returns the first 10 possible matches and it doesn't help if the themeable object you're seeking doesn't start with the letters you're entering in the autocomplete field. One can also use the Functions page, but that returns lots of non-theme matches to wade through.)So, I threw together a quick View on my local, which looks like this:
What do people think? If you'd like to see it for real, I can easily put it on the docs site to try out (it's a standalone View, so easily removable/modifiable if we subsequently decide we don't like it).
I was also thinking it would go well just above the "Form API Reference" entry in the menu; Theme Functions is a guide to all of the themable objects, and Form API Reference is a guide to the related subset that go into forms.