本文整理匯總了PHP中CRoute::getItemId方法的典型用法代碼示例。如果您正苦於以下問題:PHP CRoute::getItemId方法的具體用法?PHP CRoute::getItemId怎麽用?PHP CRoute::getItemId使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類CRoute
的用法示例。
在下文中一共展示了CRoute::getItemId方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1:
">
</span>
<?php
echo JHTML::_('form.token');
?>
<span>
<button class="joms-button--neutral"><?php
echo JText::_('COM_COMMUNITY_SEARCH_GO');
?>
</button>
</span>
<input type="hidden" name="option" value="com_community"/>
<input type="hidden" name="view" value="groups"/>
<input type="hidden" name="task" value="search"/>
<input type="hidden" name="Itemid" value="<?php
echo CRoute::getItemId();
?>
"/>
</form>
<!--<?php
if ($canCreate) {
?>
<button onclick="joms.api.videoAdd('<?php
echo $isGroup ? $groupId : '';
?>
');" class="joms-button--primary"><?php
echo !$isGroup ? JText::_('COM_COMMUNITY_VIDEOS_ADD') : JText::_('COM_COMMUNITY_GROUP_VIDEOS_ADD');
?>
</button>
<?php
}
示例2: dirname
require_once JPATH_ROOT . '/components/com_community/libraries/core.php';
require_once dirname(__FILE__) . '/helper.php';
$field = new stdClass();
$lang = JFactory::getLanguage();
$lang->load('com_community.country');
$lang->load('com_community');
//field code.
$field->code = new stdClass();
$field->code->gender = $params->get('field_gender', 'FIELD_GENDER');
$field->code->birthdate = $params->get('field_birthdate', 'FIELD_BIRTHDATE');
$field->code->country = $params->get('field_country', 'FIELD_COUNTRY');
$field->code->state = $params->get('field_state', 'FIELD_STATE');
$field->code->city = $params->get('field_city', 'FIELD_CITY');
//field value.
$field->value = new stdClass();
$field->value->gender = modDatingSearchHelper::getGenderValue($field->code->gender);
$field->value->country = modDatingSearchHelper::getCountryValue($field->code->country);
//field type
$field->type = modDatingSearchHelper::getFieldType($field->code);
//history of previous serach if exist.
$gender = JRequest::getVar('datingsearch_gender', '', 'GET');
$agefrom = JRequest::getVar('datingsearch_agefrom', '', 'GET');
$ageto = JRequest::getVar('datingsearch_ageto', '', 'GET');
$country = JRequest::getVar('datingsearch_country', '', 'GET');
$state = JRequest::getVar('datingsearch_state', '', 'GET');
$city = JRequest::getVar('datingsearch_city', '', 'GET');
$itemid = CRoute::getItemId();
$config = CFactory::getConfig();
// $js = '/assets/script-1.2.min.js';
// CFactory::attach($js, 'js');
require JModuleHelper::getLayoutPath('mod_datingsearch', $params->get('layout', 'default'));