I had an idea regarding the views issue discussed here: http://drupal.org/node/996152

If I use the add "more link" in the panel config for a block, it is its own link and has no relation to the "more link" in the views config, and so it doesn't create the trailing nid issue when the node:nid argument is present that views does.

So, if the text of this link could be editable like the views config, then I can get around this trailing nid issue and have a "more link" that is customizable.

Maybe the same ability could be extended to both blocks and content panes from the panels config, since content panes has the same issue as well because it uses the views more link ability only.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

LEternity’s picture

Version: 6.x-3.x-dev » 7.x-3.x-dev
Issue tags: +views, +panels, +more link

subscribe, this is also the case for the drupal 7 version of panels.

BParticle’s picture

subscribing

AaronBauman’s picture

This would be really useful. +1

AaronBauman’s picture

Status: Active » Needs review
FileSize
2.46 KB

Here's a patch against 6.x - it may apply to 7.x as well.
Surprisingly straightforward

merlinofchaos’s picture

Project: Panels » Chaos Tool Suite (ctools)
Version: 7.x-3.x-dev » 7.x-1.x-dev

Wrong project

bones’s picture

Agree would be very useful.

Just applied the patch and it almost works with 7.x-1.0-rc2, seems I needed to apply the same changes to the views.inc file also, but that could just be for my use case?

Also found an issue that does not allow the views read more link to display at all. Will post seperately.

merlinofchaos’s picture

Status: Needs review » Needs work

Ok, I was about to commit this, and then I realized that I think I want the ability to control the more text to be a flag on the view. Otherwise, the patch is in good shape.

Can we get that added in?

AaronBauman’s picture

Status: Needs work » Needs review
FileSize
3.48 KB

easy enough.

tim.plunkett’s picture

Status: Needs review » Needs work
+++ views_content/plugins/content_types/views_panes.inc	(working copy)
@@ -386,13 +386,15 @@
+        '#default_value' => isset($conf['more_text']) ? $conf['more_text'] : ¶
+  '',

This should be one line.

AaronBauman’s picture

Status: Needs work » Needs review
FileSize
2.7 KB

Oops, that patch was against the wrong revisions.
This one should apply cleanly.

mrfelton’s picture

Updated patch to apply cleanly with git/drush. Also adds the setting in to the views config place, which seemed to have been missing before.

fastangel’s picture

This works for me :D

RaulMuroc’s picture

Status: Needs work » Reviewed & tested by the community

I think it is not correct. This patch is based on Views Pane module and it should be based on Ctools Module because it is a Ctools problem not a Views Pane problem.

RaulMuroc’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: -views, -panels, -more link

Status: Reviewed & tested by the community » Needs work
Issue tags: +views, +panels, +more link

The last submitted patch, views_panes-more_link_text-1000146.11.patch, failed testing.

mrfelton’s picture

Status: Reviewed & tested by the community » Needs review
FileSize
4.11 KB

Updated patch to apply against latest -dev

RaulMuroc’s picture

I test it and no "more link" appears at all but perhaps is because of my own configuration :S

Information that perhaps helps about my own config: I have a 'view: statuses stream' which filters by type 'status' showing 5 times the node. that veiws creates a block and this block is shown through panels. So it should be a "more link" linking to that view result to see all the statuses (more than 5 for sure).

Thank you.

RaulMuroc’s picture

Something can test more?

joel_osc’s picture

Issue summary: View changes

The patch works well for me using a Content Pane (not a block), in the 'Allow Settings' check both the 'more link' and the 'more text' - then you should see the more link text field show up on your pane config.

I think there is a potential improvement to the patch, and that would be to run it through the context keyword subtitution so you can place contextual information into the more link text. Here is the suggested change to the views_content_views_panes_content_type_render function in views_panes.inc:

    230       $view->display_handler->set_option('use_more', TRUE);
    231       if (!empty($conf['more_text']) && $allow['more_text']) {
    232         $view->display_handler->set_option('use_more_text', ctools_context_keyword_substitute($conf['more_text'], array(), $contexts));
    233       }

Cheers!

Status: Needs review » Needs work

The last submitted patch, 16: views_panes-more_link_text-1000146.16.patch, failed testing.

mrjmd’s picture

Status: Needs work » Needs review
FileSize
4.02 KB

Re-rolled and added in the change from #19.

kalabro’s picture

Status: Needs review » Needs work
techninja’s picture

Rerolled this patch to apply after changes mentioned in #23 :D

chasingmaxwell’s picture

Fixed a typo in the previous patch.

lesleyfernandes’s picture

Hey guys, this patch is working for us. Are you planning to have this feature on the 7.x-1.13 version? Thank you.

lesleyfernandes’s picture

Due the release of the new Ctools version (7.x-1.13) the patches above are not working anymore.

cboyden’s picture

Status: Needs work » Needs review
FileSize
4 KB

Here's a patch that's rerolled against the latest dev.

dsnopek’s picture

Status: Needs review » Reviewed & tested by the community
Related issues: +#2968560: Allow overriding "more" text on Views-based widgets

The code looks good to me and works in my testing! This patch is likely to be included in Panopoly: #2968560: Allow overriding "more" text on Views-based widgets

dsnopek’s picture

Issue tags: +panopoly
xlin’s picture

Re-roll #24 against #1910608 (patch #56),

xlin’s picture

Fix bug in patch #24. Again, use this patch ONLY if you are also using patch from https://www.drupal.org/project/ctools/issues/1910608.

xlin’s picture

Updated to patch #32. Since more_link and more_text are two separate options, it seems odd to have more_text depends on more_link. e.g, I want user to be able to override the more_text but not giving them the option to turn it off.