A
A
ayapergenov2015-07-01 19:18:53
CMS
ayapergenov, 2015-07-01 19:18:53

How to display the content of the component property on the page in Bitrix?

You need to display information about the author (login, full name, phone number, email) in the news infoblock.
Created an author property and associated it with users.
Now only the author's id number is displayed on the page, instead of the full name and personal data.
You can see it on the website page.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maksim Zverev, 2015-07-01
@ayapergenov

It used to be like this:
For detailed news:

<? 
$create_user=$arResult["CREATED_BY"]; 
$GLOBALS['users'] = array("CREATED_BY" => $create_user); 
$userid= $create_user; 
$rsUser = CUser::GetByID($userid); 
$arUser = $rsUser->Fetch(); 
?> 

<? echo $arUser["NAME"];?> 
<? echo $arUser["EMAIL"];?> 
<? echo $arUser["WORK_COMPANY"];?> 
<? echo CFile::ShowImage($arUser['PERSONAL_PHOTO'], 98, 98, 'border=0', '', true); ?>

For news list, replace arResult with arItem

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question