Answer the question
In order to leave comments, you need to log in
How to hide an Include Area from indexing?
Good afternoon.
In component_epilog.php (where the Product Characteristics were written by the developers of the Solution itself), the Include area component was added to display a block of text (one text for the entire Catalog in the Detailed product cards ).
SEO-shnik asks to hide it from indexing. Advise through AJAX to do. I do not want to fence extra crutches.
Is it possible to somehow get by with Bitrix? Or is it through AJAX?
Answer the question
In order to leave comments, you need to log in
All the same, I did it through Ajax .
Because this option even hides a block from the file from the page code. And from indexing as well.
1. In the template where you need to put the desired block
<div id="extra"></div>
<script type="text/javascript">
$(function(){
$.ajax({
url: "ссылка-на-файл",
dataType: "json",
success:function(data){
$("#extra").html(data.extra);
}
});
});
</script>
<?php
$html = '
//Дополнительная инфа
//Дополнительная инфа
';
$data['extra'] = $html;
echo json_encode($data);
?>
<script type='text/javascript' src='https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js?ver=5.5.1' id='jquery-js'></script>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question