tag localization

This commit is contained in:
merdan 2021-04-15 17:48:50 +05:00
parent 9ed92ca87f
commit ae36e6c407
2 changed files with 5 additions and 3 deletions

View File

@ -3,6 +3,7 @@
use Bedard\BlogTags\Models\Tag;
use Cms\Classes\ComponentBase;
use DB;
use Illuminate\Support\Facades\App;
class BlogTags extends ComponentBase
{
@ -81,7 +82,7 @@ class BlogTags extends ComponentBase
public function onRun()
{
// Start building the tags query
$query = Tag::with('posts');
$query = Tag::where('locale',App::getLocale());
// Hide orphans
if ($this->property('hideOrphans'))
@ -101,5 +102,6 @@ class BlogTags extends ComponentBase
$query->take($take);
$this->tags = $query->get();
}
}

View File

@ -13,8 +13,8 @@ pageNumber = "{{ :page }}"
postsPerPage = 10
noPostsMessage = "No posts found"
sortOrder = "published_at desc"
categoryPage = "blog/category"
postPage = "blog/post"
categoryPage = "category"
postPage = "post"
==
<div class="main__content">
<div class="heading">