I've got a panel node displaying a view. In the panel content configuration I set the option to display a "more" link to the view. I need to theme this link so that I says something other than "more", but I'm not sure which theme override function, if any, I should use. Is this link generated by views? So I should be able to theme the views "more" link? Or is it generated by panels, and I should looking for a panels theme override?
This is somewhat urgent, so all help is appreciated.
Christopher M. Jones wrote:
I've got a panel node displaying a view. In the panel content configuration I set the option to display a "more" link to the view. I need to theme this link so that I says something other than "more", but I'm not sure which theme override function, if any, I should use. Is this link generated by views? So I should be able to theme the views "more" link? Or is it generated by panels, and I should looking for a panels theme override?
This is somewhat urgent, so all help is appreciated.
You should be able to create a file in your theme directory called "views-more.tpl.php". See the file {views directory}/theme/views-more.tpl.php for guidance on what variables are available. If you're using D6, you'll have to clear your cache after adding the template file to your theme directory.
Cheers,
Jonathan
Thanks for the help. I found that method when searching for the solution, but my views directory does not have that file. I'm using views under D5. Should have said that the first time.
So there is an exposed function, theme_views_more(), which I put into my template.php file. It properly themes the 'more' link in block views, but panels still have the old "more" link text. Changing the panel view from embedded to block had no effect.
It looks to me that this 'more' link is provided by panels, and not by views. So my override doesn't affect it and I need to be looking at panels for the answer, not views.
Thanks again. If anyone has any further light to shed, it is very much appreciated.
Jonathan Hedstrom wrote:
Christopher M. Jones wrote:
I've got a panel node displaying a view. In the panel content configuration I set the option to display a "more" link to the view. I need to theme this link so that I says something other than "more", but I'm not sure which theme override function, if any, I should use. Is this link generated by views? So I should be able to theme the views "more" link? Or is it generated by panels, and I should looking for a panels theme override?
This is somewhat urgent, so all help is appreciated.
You should be able to create a file in your theme directory called "views-more.tpl.php". See the file {views directory}/theme/views-more.tpl.php for guidance on what variables are available. If you're using D6, you'll have to clear your cache after adding the template file to your theme directory.
Cheers,
Jonathan
Thanks for the help. I just needed to look more closely at panels. Changing from embedded to block, and **disabling the more link in panels** allowed views to place it's themed more link in there.
Jonathan Hedstrom wrote:
Christopher M. Jones wrote:
I've got a panel node displaying a view. In the panel content configuration I set the option to display a "more" link to the view. I need to theme this link so that I says something other than "more", but I'm not sure which theme override function, if any, I should use. Is this link generated by views? So I should be able to theme the views "more" link? Or is it generated by panels, and I should looking for a panels theme override?
This is somewhat urgent, so all help is appreciated.
You should be able to create a file in your theme directory called "views-more.tpl.php". See the file {views directory}/theme/views-more.tpl.php for guidance on what variables are available. If you're using D6, you'll have to clear your cache after adding the template file to your theme directory.
Cheers,
Jonathan