It has just occurred to me that I probably need to put a theme function in here somewhere. Apart from that, I think it is good.

CommentFileSizeAuthor
#3 morelink2.patch6.48 KBalpritt
morelink.patch2.91 KBalpritt

Comments

merlinofchaos’s picture

Status: Needs review » Needs work

This is pretty good. Comments:

1) block_more_link is too long of a name and 'block' is redundant since it's already specific to the block display. I'd say just 'more' is plenty, or 'more_link' if you're worried about future confusion.

2) You're right, this needs a theme function. Views 1 uses theme_views_more -- run it through views_theme_functions so that, like everything, it can be themed easily and independently.

After that this patch will likely be ready to go. Thanks!!

merlinofchaos’s picture

I've been thinking on this. This should not be specific to blocks.

Instead, this should be general, and then modules that don't want it can disable it; similar to how use pager works. Because the default implementation could certainly use a 'more' link as well.

alpritt’s picture

Status: Needs work » Needs review
StatusFileSize
new6.48 KB

This works as far as I can tell with a foggy brain.

This was my first encounter with the new theme system, so not too sure of best practices etc. Is it overkill to have a tpl file for a single link? Thinking about it, it probably makes more sense to just merge it into the views-view.tpl.php file.

One thing that did throw me for a while is the fact that the first display you create doesn't have a unique id. That means there is no way to isolate it when it comes to theming, since subsequent displays will inherit the first display's id too. For example, views-more--block.tpl.php will theme all of the display blocks, but with the second display you can create a views-more--block-1.tpl.php. There is no views-more--block-0.tpl.php

On the other hand I could just be tired :)

merlinofchaos’s picture

Status: Needs review » Fixed

Committed! I made a slight revision to the text, but otherwise this looked great. Thank you very much!!

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.