On all admin pages an empty page title is set, if the mini panel doesn't provide a title. In this case the title should default to "No title".
The enclosed patch introduces and implements panels_mini_get_title().
(To keep things consistent, for panels_mini_preview_panel() the $mini argument is changed to $panel_mini.)
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | panels_mini_get_title_6.patch | 3.68 KB | pancho |
| #4 | panels_mini_get_title_4.patch | 4.18 KB | pancho |
| #3 | panels_mini_get_title_2.patch | 4.15 KB | pancho |
| #2 | panels_mini_get_title_2.patch | 4.15 KB | pancho |
| panels_mini_get_title.patch | 4.17 KB | pancho |
Comments
Comment #1
panchoStill applies with some offset.
Bumping this to get reviewed.
Comment #2
panchoRerolled after the big code cleanup.
Comment #3
panchoRerolled after the big code cleanup.
Comment #4
panchoRerolled after #264122: Import fails: non-stdClass object in $_SESSION['pp_import'] has been committed.
Please review and tell me if introducing panels_mini_get_title() is okay!
Comment #5
sdboyer commentedAhh, basically the poor man's version (aka, php4 version) of __get(). *grumbles about php4*
Yes, I think that this is generally the route to go; I suspect that it's very much like the overall route we'll have to adopt for handling titles in the more general scope, anyway. Haven't tested it yet, however, so this remains a general +1.
Comment #6
panchoRolling in more changes was no good idea. I stripped down the patch to the necessary changes, making it slightly easier to grasp.
Comment #7
panchoStop, this is neither complete nor good, though it doesn't do any harm.
We already had panels_mini_title_mini_panel(), being used only in some rare situations. This needs to be merged to keep the code simple.
Comment #8
sdboyer commentedSo what's the verdict here? Not quite sure from #7.
Comment #9
merlinofchaos commentedWhy should mini panels always have a title? It's perfectly valid to have blocks without titles. Forcing a title seems wrong to me.
Comment #10
sunAgreeing with Earl here. However, is it possible that this patch tries to fix a hidden bug? If panels_mini did not use a getter function for determining the title yet, complex title overrides (using context > layout > default) as in panels pages are not working currently? Just a wild guess, didn't look at the code.
Comment #11
sunoh well, Pancho is only referring to
...and that makes probably sense :)
Regardless of that, #10 sounds curious, too - at least for me.
Comment #12
kaytan commentedHie
I have a problem!
I can't find panels_mini.zip on drupal!
does any one know the download link?
I'm tired of searching,please give me the link if you have it,I need it a lot because panels style needs it for working
thanks
Comment #13
esmerel commentedhttp://drupal.org/node/740130
Comment #14
esmerel commentedThat should say No fixes will be added to the 2.x line.