E
E
Eugene M2018-07-18 22:51:46
1C-Bitrix
Eugene M, 2018-07-18 22:51:46

How to display description in bitrix without meta tag?

The standard construction <? $APPLICATION->ShowMeta("description") ?>outputs as follows, <meta name="description" content="Здесь текст"/>but you just need to get it Здесь текстwithout the META tag.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
E
Eugene M, 2018-07-19
@hotwind

<meta property="og:description" content="<?$APPLICATION->ShowProperty('description');?>" />

A
Andrey Nikolaev, 2018-07-18
@gromdron

UPDATE 07/19/2018:
Judging by the direct statement of the question, to get the property value, you need to use CMain::GetProperty() :
However, this mechanism works on the technology of deferred functions , which means that depending on the place of the call, a different result may be returned.
The author assumes the use of CMain::ShowProperty() , via However, this possibility exists only in the site template and does not imply further manipulations with the result. For example, in order to add the user's city to the description, it is absolutely impossible to use ShowProperty to manipulate data; instead, you should subscribe to the onEpilog event of the main module and change the value of the string using GetProperty + SetProperty

A
arhis77, 2022-01-10
@arhis77

Tell me, is it possible to override the place where the tag is displayed, raise it to the very top of the page, almost immediately after?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question