<?$APPLICATION->IncludeComponent(
"bitrix:main.include",
"",
Array(
"AREA_FILE_SHOW" => "file",
"PATH" => "/include/file.php"
)
);?>
<? CModule::IncludeModule("highloadblock");
use Bitrix\Highloadblock as HL;
use Bitrix\Main\Entity;
if (CModule::IncludeModule('highloadblock')) { ?>
<?
$arHLBlock = Bitrix\Highloadblock\HighloadBlockTable::getById(2)->fetch(); //Здесь ID Инфоблока
$obEntity = Bitrix\Highloadblock\HighloadBlockTable::compileEntity($arHLBlock);
$strEntityDataClass = $obEntity->getDataClass();
$resData = $strEntityDataClass::getList(array(
'select' => array('ID', "UF_SORT", "UF_LINK", "UF_LINK_ENG", "UF_IMG", "UF_IMG_ENG", "UF_ACTIVE"),//Поля созданные в HL инфоблоке
'filter' => array("UF_ACTIVE" => "1"), //Фильр по полю
'order' => array('UF_SORT' => 'ASC'), // Сортировка по полю
'limit' => 100,
));
while ($arItem = $resData->Fetch()) {
//ВЫВОД ДАННЫХ
}
?>
<?
}
?>
$(document).ready(function() {
var arr = ["#a", "#b", "#c", "#d", "#e"];
var p = -1;
$(arr[0]).click(function() {
var pp = 1;
alert(pp);
});
if (pp == 1) {
alert(pp)
}
$(arr[1]).click(function() {
var pp = 2;
alert(pp);
});
if (pp == 2) {
alert(pp);
}
});
$("#edit_name").attr('placeholder','Введите имя');
$('.form-item input').each(function(){
$(this).attr('placeholder',$(this).prev().html());
});
P.S. До этого делал эти формы на modx. На друпал с нуля не пишу, только передулываю за другими.
testStr = 'http://name.ru/name?date=01%2F15%2F2016&count-people=45';
regExpWrapper = new RegExp('(?:date=)(.*?)&(?:.*)=(.*)$');
result = regExpWrapper.exec(decodeURIComponent(testStr));
console.log(result[2] + '. ' + result[1]);
function YOUR_THEME_NAME_preprocess_html(&$vars) {
$relap = array(
'#type' => 'html_tag',
'#tag' => 'meta',
'#attributes' => array(
'property' => 'relap:article',
'content' => 'false',
)
);
drupal_add_html_head($relap, 'relap');
}