serverchanges

This commit is contained in:
root 2021-11-01 12:34:49 +00:00
parent d4668355a8
commit 635ebe3b68
8 changed files with 40 additions and 17 deletions

View File

@ -32,5 +32,21 @@ class BlogPost extends ComponentBase
]
];
}
public function onRun(){
$post = $this->page->post;
//$post->title = 'test';
if($post){
$tags = $post->{'tags_'.$post->locale};
if($tags and $tags->count()>0)
{
$this->page->tags = $tags->implode('name', ', ');
}
}
}
}

View File

@ -14,9 +14,8 @@
<meta name="description" content="{{post.powerseo_description}}">
{% endif %}
{% if post.powerseo_keywords %}
<meta name="keywords" content="{{post.powerseo_keywords}}">
{% endif %}
<meta name="keywords" content="{{this.page.seo_keywords}}, {{this.page.tags}}{% if post.powerseo_keywords %}, {{post.powerseo_keywords}}{% endif %}">
{% if post.powerseo_canonical_url %}
<link rel="canonical" href="{{post.powerseo_canonical_url}}" />

View File

@ -1,7 +1,7 @@
{% if __SELF__.group and __SELF__.group.adds %}
<div class="advertisiment_{{__SELF__}}">
<div class="rek_{{__SELF__}}">
{% for reklama in __SELF__.group.adds %}
<a class="advertisiment__item"
<a class="rek__item"
{% if reklama.enable_stats and reklama.url %}
data-request="{{__SELF__}}::onRedirect"
data-request-data = '[{id:{{reklama.id}}},{url:"{{reklama.url}}"}]'
@ -20,7 +20,7 @@
<script>
// advertisement start
$(function () {
var $slideshow = $(".advertisiment_{{__SELF__}}");
var $slideshow = $(".rek_{{__SELF__}}");
var ImagePauses = {{__SELF__.group.adds.pluck('display')}};
// Init
@ -53,7 +53,7 @@
{% put scripts %}
<script>
$(function () {
var $slideshow = $(".advertisiment_{{__SELF__}}");
var $slideshow = $(".rek_{{__SELF__}}");
var ImagePauses = {{__SELF__.group.adds.pluck('display')}};
// Init

View File

@ -5,7 +5,7 @@ meta_title = "Новости Туркменистана и мира"
meta_description = "Новости Туркменистана за сегодня. Последние актуальные политические, экономические новости в
Туркменистане."
is_hidden = 0
seo_keywords = "Новости Туркменистана, последние новости Туркменистана, Туркменистан, Turkmenistan news, latest news of Turkmenistan, president of Turkmenistan, Türkmenistanyň sonky habarlary, täzelikler, syýasy habarlar."
seo_keywords = "Новости Туркменистана, Туркменистан, Turkmenistan news, president of Turkmenistan, Türkmenistanyň habarlary, syýasy habarlar, Ориент новости, Туркменистан, Ашхабад, Orienttm, Orient News, Ashgabat."
robot_index = "index"
robot_follow = "follow"

View File

@ -2,6 +2,7 @@ title = "Пост"
url = "/post/:id/:slug"
layout = "cms"
is_hidden = 0
seo_keywords = "Türkmenistan, Turkmenistan, Туркменистан, Ориент новости, Orient news, Orienttm, Turkmen habarlary, Turkmen habarlar, Turkmen news, Новости Туркменистана, Новости СНГ, Новости средней азии, Новости Центральной Азии,"
robot_index = "index"
robot_follow = "follow"

View File

@ -1,12 +1,16 @@
title = "Поиск"
url = "/search"
layout = "cms"
meta_title = "Поиск"
meta_description = "Поиск"
is_hidden = 0
robot_index = "index"
robot_follow = "follow"
robot_index = "noindex"
robot_follow = "nofollow"
[viewBag]
localeTitle[en] = "Search"
localeMeta_title[en] = "Search"
localeMeta_description[en] = "Search"
[blogPosts]
pageNumber = "{{ :page }}"
@ -19,14 +23,14 @@ postPage = "post"
<div class="main__content">
<div class="heading">
<div class="heading__title">
{{'page.search'}}
{{'page.search'|_}}
</div>
{% for item in blogPosts.posts %}
{% partial 'post_list_item' post = item %}
{% else %}
<p>No posts found</p>
{% endfor %}
{% partial 'pagination' items = blogPosts.posts %}
{% partial 'pagination' items = blogPosts.posts filter = ['q',input('q')]%}
</div>
</div>
<div class="main__sidebar">
@ -35,4 +39,4 @@ postPage = "post"
</div>
{% put scripts %}
<script src="{{['assets/js/lazy.js','assets/js/main.js']|theme}}"></script>
{% endput %}
{% endput %}

View File

@ -15,6 +15,4 @@
<meta name="msapplication-TileImage" content="{{'assets/images/icon/cropped-cropped-orienticon-270x270.png'|theme}}">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="google-site-verification2" content="GEfDQ_LMP4ly0tTnTcuX2Kr7WKri-Ql89FDLmYAKJXg" />
<meta name="google-site-verification" content="WtxIxLTZ6EPLwx5WVCYCbGEAVDFOJzu-TM_OOdx5klY" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">

View File

@ -1,3 +1,5 @@
[viewBag]
==
{% if items.total > items.perPage %}
<div class="heading__footer">
<a href="{{items.previousPageUrl|default('#')}}{%if filter and items.previousPageUrl %}{{'&'~filter.0~'='~filter.1}}{% endif %}" class="heading__footer-page">
@ -17,6 +19,9 @@
<div class="heading__footer-input">
<input type="text" value="{{items.currentPage|default('1')}}" name="page">
{%if filter %}
<input type="hidden" name="{{filter.0}}" value="{{filter.1}}">
{% endif %}
{%if dateFilter %}
<input type="hidden" name="date" value="{{dateFilter}}">
{% endif %}
@ -38,4 +43,4 @@
</a>
<span>{{'paginate.from'|_}} {{(items.total/items.perPage)|round(0,'ceil')}}</span>
</div>
{% endif %}
{% endif %}