Answer the question
In order to leave comments, you need to log in
How to display a bulleted list from the admin panel in Bitrix?
In the infoblock, I created the ATT_DSC_RATE property of the HTML/text type.
I tried to display it like this, but the entire description is displayed in one li. Is it possible to do something so that with each new line there is a new li? Or are bulleted lists generally done differently?
<ul>
<?foreach($arItem["DISPLAY_PROPERTIES"] as $pid=>$arProperty):?>
<?if($pid =="ATT_DSC_RATE"): ?>
<li><?echo $arProperty["DISPLAY_VALUE"];?></li>
<?endif?>
<?endforeach;?>
</ul>
Answer the question
In order to leave comments, you need to log in
Why not initially store the layout of the list in the field itself?
Well, if you need to pervert, then so be it.
<ul>
<?
$text = $arItem["DISPLAY_PROPERTIES"]["ATT_DSC_RATE"]["DISPLAY_VALUE"];
$lines = explode("\n", $text);
?>
<?foreach($lines as $line): ?>
<?if(trim($line) != ""):?>
<li><?echo $line;?></li>
<?endif?>
<?endforeach;?>
</ul>
www.youtube.com/playlist?list=PLov7vC9M_skJLTh4ghR...
www.youtube.com/watch?v=2YZD6t8Jb78&list=PLov7vC9M...
www.youtube.com/watch?v=dOAWLkT3J88&list=PLov7vC9M...
Clear and understandable
It helps a lot to analyze ready-made scripts: sliders, animations, etc. Here is one of the resources with ready-made examples: www.cssscript.com/free-javascripts - practice!
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question