If a custom url is used under link display in views, and then through the panels views pane settings interface the box in settings for adding a more link is selected the rendered more link won't honor the custom url path.

Comments

Letharion’s picture

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

Sounds like an issue in the content panes, not Panels.

RaulMuroc’s picture

I agree, the link "more" created but panels just points to the Home page of website, not to the views link itself and there is no way to set it up.

richsky’s picture

Issue tags: +template preprocess

Still don't know if related but, following this issue, I just found out that the view settings and the panel settings are acting only on one template preprocess variable, variables['more'], the view one.

On the template side, the variables['more'] is never set in panel template (panels-pane.tpl.php), only in views template.

So if you want to display the view more links set in view and allow it in panels, but only the view template will show it, if you want to have the more link in panels, your need to set it like this (but hide it in views or panel settings).

function public_preprocess_panels_pane(&$variables) {
  //Provide more link for panel template
  if ($variables['pane']->type == 'views_panes') {
    $path = $variables['pane']->configuration['path'];
    $variables['more'] = l('More', $path);
  }
}