0 Пользователей и 1 Гость просматривают эту тему.
  • 0 Ответов
  • 463 Просмотров
*

Stasweb

  • Завсегдатай
  • 1492
  • 24 / 0
Необходимо в AMP странице отключить все что выводит head в документе.Если прописываю <head>.......</head> без <jdoc:include type="head" /> то на страницу все ровно вываливается все с <head>.......</head>.Скрипты соответственно я добавлю сам и мне необходимо запретить вывод всех скриптов в head. Подскажите как это возможно сделать.вот моя amp.php
Цитировать
Код
<?php defined( '_JEXEC' ) or die( 'Restricted access' );  ?>
<!doctype html>
<html amp lang="ru">
<head>
<meta charset="utf-8">
<?php
$document = JFactory::getDocument();
  echo "<title>".$document->title."</title>".PHP_EOL;
  if (!empty($document->description)) { echo "<meta name='description' content='".$document->description."'/>";
  }else {
  $descr = str_replace("\n", ' ', $document->_custom[8]);  echo $descr;
  }
?>
<link rel='canonical' href='<?php echo JURI::current(); ?>' >
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
<script async type='text/javascript' src="https://cdn.ampproject.org/v0.js"></script>
<amp-analytics type="googleanalytics" id="googleanalytics">
<script type="application/json">
 {
          "vars": {"account": "UA-42409854-1"},
          "triggers": {"defaultPageview": { "on": "visible", "request": "pageview",
              "vars": { "title": "AMP Pageview" }
            }
          }
}
</script>
</amp-analytics>
<style amp-boilerplate>body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}</style><noscript><style amp-boilerplate>body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}</style></noscript>
    <style amp-custom>
#bd_results{width: 90%;margin: 0px auto;}
.category_description{ }
.category_description{ font-size:16; text-align: center; border-bottom: solid 1px #4d3b3b4d;}
.width33 { width: 350px; height: auto; display: inline-block;}
.width30 { width: 150px; height: 150px; float: left; margin: 5px 15px 5px 0px; }
.category_name_h2{ }
.image-category-product{ }
.image-category-product img {width: 99%; float: left;}
.floatright{float: left; margin: 0px 0px 0px 5px;}
.category_produkt{ }
.category_produkt a{ font-size: 15; }
.product_s_desc{font-size: 15; color: #888; }
.orderby-displaynumber{ }
.orderlistcontainer{ }
.row{width: 63%; margin: 0 auto; border-bottom: 1px solid #d8d8d81a; border-bottom-color: rgba(216, 216, 216, 0.12); border-bottom-style: solid; border-bottom-width: 1px;}
@media screen and (min-width:380px) and (max-width:800px) {
.row{width: 90%; margin: 0 auto; border-bottom: 1px solid #d8d8d81a; border-bottom-color: rgba(216, 216, 216, 0.12); border-bottom-style: solid; border-bottom-width: 1px; }
.product-image {width: 90%; margin: 0 auto;}
.product-image img {width: 90%; margin: 0 auto;}
.product-name h2 {font-size: 30px;}
.product-name a {color: #434343;}
.product-name{width: 90%; margin: 0 auto; text-align: -webkit-center;}
.PricesalesPrice {width: 90%; margin: 0 auto;}
.PricesalesPrice span {font-size: 35px;}
.product-name p {font-size: 20px; text-decoration: none; user-select: none; background: rgba(226, 225, 225, 0.35); padding: .7em 1.5em;  outline: none; }
.productdetails-view h1{ text-align: center;}
.product-short-description{text-align: center;}
.container_image_all{width: 90%; margin: 0 auto; text-align: -webkit-center;display: inline-grid;}
.spacer-buy-area{ width: 90%; margin: 0 auto;}
.product-price{    margin: 20px; text-align: -webkit-center; font-size: 35px;}
.product-rating-mobile{display:none;}
}
</style>
  </head>
<body><jdoc:include type="component" /></body>
</html>
Чтобы оставить сообщение,
Вам необходимо Войти или Зарегистрироваться
 

Нужна помощь и руководство

Автор ArtColyer

Ответов: 3
Просмотров: 528
Последний ответ 27.01.2024, 17:14:58
от web1
Странная хрень происходит, нужна помощь!

Автор RicoID

Ответов: 17
Просмотров: 15009
Последний ответ 08.11.2023, 09:37:38
от Kivlov
Обучение и помощь с сайтами на Joomla

Автор 1Ksenia

Ответов: 1
Просмотров: 419
Последний ответ 02.09.2022, 13:44:25
от darkghost
Нужна срочная помощь

Автор Stasweb

Ответов: 1
Просмотров: 477
Последний ответ 18.08.2022, 18:55:08
от NewUsers
Доступ к страницам после оплаты

Автор Kosshechka

Ответов: 26
Просмотров: 857
Последний ответ 15.04.2022, 18:15:49
от Alex2108