resizer
This commit is contained in:
parent
1b4651cef3
commit
25851047b6
|
|
@ -4,6 +4,7 @@ use Cms\Classes\Page;
|
||||||
use Bedard\BlogTags\Models\Tag;
|
use Bedard\BlogTags\Models\Tag;
|
||||||
use Cms\Classes\ComponentBase;
|
use Cms\Classes\ComponentBase;
|
||||||
use Rainlab\Blog\Models\Post;
|
use Rainlab\Blog\Models\Post;
|
||||||
|
use App;
|
||||||
|
|
||||||
class BlogTagSearch extends ComponentBase
|
class BlogTagSearch extends ComponentBase
|
||||||
{
|
{
|
||||||
|
|
@ -197,7 +198,7 @@ class BlogTagSearch extends ComponentBase
|
||||||
private function calculatePagination()
|
private function calculatePagination()
|
||||||
{
|
{
|
||||||
// Count the number of posts with this tag
|
// Count the number of posts with this tag
|
||||||
$this->totalPosts = Post::whereHas('tags', function($tag) {
|
$this->totalPosts = Post::whereHas('tags_'.App::getLocale(), function($tag) {
|
||||||
$tag->where('name', $this->property('tag'));
|
$tag->where('name', $this->property('tag'));
|
||||||
})
|
})
|
||||||
->count();
|
->count();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue