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.)

Comments

pancho’s picture

Still applies with some offset.
Bumping this to get reviewed.

pancho’s picture

StatusFileSize
new4.15 KB

Rerolled after the big code cleanup.

pancho’s picture

StatusFileSize
new4.15 KB

Rerolled after the big code cleanup.

pancho’s picture

StatusFileSize
new4.18 KB

Rerolled 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!

sdboyer’s picture

Ahh, 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.

pancho’s picture

StatusFileSize
new3.68 KB

Rolling in more changes was no good idea. I stripped down the patch to the necessary changes, making it slightly easier to grasp.

pancho’s picture

Status: Needs review » Needs work

Stop, 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.

sdboyer’s picture

So what's the verdict here? Not quite sure from #7.

merlinofchaos’s picture

Why should mini panels always have a title? It's perfectly valid to have blocks without titles. Forcing a title seems wrong to me.

sun’s picture

Agreeing 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.

sun’s picture

Title: panels_mini: Always show "No title" if there is no title » panels_mini: Show "No title" in admin if there is no title

oh well, Pancho is only referring to

On all admin pages

...and that makes probably sense :)

Regardless of that, #10 sounds curious, too - at least for me.

kaytan’s picture

Hie
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

esmerel’s picture

Status: Needs work » Closed (won't fix)
esmerel’s picture

That should say No fixes will be added to the 2.x line.