Skip to content

Instantly share code, notes, and snippets.

@pafnuty
Last active September 16, 2015 06:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pafnuty/698d2e9f77ebd75f666f to your computer and use it in GitHub Desktop.
Save pafnuty/698d2e9f77ebd75f666f to your computer and use it in GitHub Desktop.
Сравнение синтаксисов Bitrix и Fenom

Сравнение синтаксисов

Bitrix:

<?if($arParams['DISPLAY_TOP_PAGER']):?>
    <?=$arResult['NAV_STRING']?>
<?endif;?>

Fenom:

{if $arParams.DISPLAY_TOP_PAGER}
    {$arResult.NAV_STRING}
{/if}

Bitrix:

<?bxPrintr($arResult, false, 'arResult');?>

Fenom:

{$arResult|bxPrintr: false, 'arResult'}

Bitrix:

<?if(count($arResult['ITEMS']) > 0):?>
    <?foreach($arResult['ITEMS'] as $arItem):?>
        <h2><?=$arResult['NAME']?></h2>
    <?endforeach?>
<?else:?>
    Новостей нет
<?endif?>

Fenom:

{foreach $arResult.ITEMS as $arItem}
    <h2>{$arItem.NAME}</h2>
{foreachelse}
    Новостей нет
{/foreach}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment