Answer the question
In order to leave comments, you need to log in
How to put information from a component into meta tags in Bitrix?
Good afternoon.
Tell me how to properly stuff information from a component on the page into meta tags. For example, generate FB meta tags for news pages by placing a photo from the announcement of the current news in og:image.
Interested in the "correct" solution that fits into the ideology of Bitrix. (in the sense of not 100% a crutch).
Thank you!
Answer the question
In order to leave comments, you need to log in
You first describe what you can't do.
The question is just too general.
Well, you need to display data there? Guess who's stopping you?
In the component template, in the component_epilog.php file, add the necessary meta tags to the header.
Or data from those that are not cached?
Or will multiple components compete on the same page?
Or do not know how to add a line to the header?
Or don't know how and where to create component_epilog.php?
In general - clarify the question.
$APPLICATION->AddHeadString('<meta src="'.$MySuperSrc.'"; data="superdata" rel="vabschesuperrel" />',true);
//
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question