Joomla! Template Override:

com_contact aufs Formular reduziert


Dieser Override ermöglicht es einen Kontakt aus com_contact / contact nur als Formular darzustellen. Um das Einbinden einzelner Formulare zu erleichtern kann zusätzlich zum Template-Override auch der angepasste Menüpunkt (XML-Datei) verwendet werden. Dieser stellt dann ein einzelnes Formular dar.

GitHub-Repository: https://github.com/ProfessorLogout/JoomlaOverrides/tree/master/com_contact/contact  

Benötigte Override-Dateien


  • <?xml version="1.0" encoding="utf-8"?>
    <metadata>
    	<layout title="SoloForm" option="Shows the contact form of one contact">
    		<message>
    			Shows the contact form of one contact
    		</message>
    	</layout>
    
    	<!-- Add fields to the request variables for the layout. -->
    	<fields name="request">
    		<fieldset name="request"
    			addfieldpath="/administrator/components/com_contact/models/fields"
    		>
    			<field 
    				name="id"
    				type="modal_contact"
    				label="COM_CONTACT_SELECT_CONTACT_LABEL"
    				description="COM_CONTACT_SELECT_CONTACT_DESC"
    				required="true"
    				select="true"
    				new="true"
    				edit="true"
    				clear="true"
    			/>
    		</fieldset>
    	</fields>
    
    	<!-- Add fields to the parameters object for the layout. -->
    	<fields name="params">
    
    		<!-- Form options. -->
    		<fieldset name="Contact_Form"
    			label="COM_CONTACT_MAIL_FIELDSET_LABEL"
    		>
    
    			<field 
    				name="show_email_form" 
    				type="list"
    				label="COM_CONTACT_FIELD_EMAIL_SHOW_FORM_LABEL"
    				description="COM_CONTACT_FIELD_EMAIL_SHOW_FORM_DESC"
    				class="chzn-color"
    				>
    				<option value="1">JSHOW</option>
    			</field>
    
    			<field 
    				name="show_email_copy"
    				type="list"
    				label="COM_CONTACT_FIELD_EMAIL_EMAIL_COPY_LABEL"
    				description="COM_CONTACT_FIELD_EMAIL_EMAIL_COPY_DESC"
    				useglobal="true"
    				class="chzn-color"
    				>
    				<option value="0">JHIDE</option>
    				<option value="1">JSHOW</option>
    			</field>
    
    			<field 
    				name="banned_email"
    				type="textarea"
    				label="COM_CONTACT_FIELD_CONFIG_BANNED_EMAIL_LABEL"
    				description="COM_CONTACT_FIELD_CONFIG_BANNED_EMAIL_DESC"
    				cols="30"
    				rows="3"
    			/>
    
    			<field 
    				name="banned_subject"
    				type="textarea"
    				label="COM_CONTACT_FIELD_CONFIG_BANNED_SUBJECT_LABEL"
    				description="COM_CONTACT_FIELD_CONFIG_BANNED_SUBJECT_DESC"
    				cols="30"
    				rows="3"
    			/>
    
    			<field 
    				name="banned_text"
    				type="textarea"
    				label="COM_CONTACT_FIELD_CONFIG_BANNED_TEXT_LABEL"
    				description="COM_CONTACT_FIELD_CONFIG_BANNED_TEXT_DESC"
    				cols="30"
    				rows="3"
    			/>
    
    			<field 
    				name="validate_session"
    				type="list"
    				label="COM_CONTACT_FIELD_CONFIG_SESSION_CHECK_LABEL"
    				description="COM_CONTACT_FIELD_CONFIG_SESSION_CHECK_DESC"
    				useglobal="true"
    				class="chzn-color"
    				>
    				<option value="0">JNO</option>
    				<option value="1">JYES</option>
    			</field>
    
    			<field 
    				name="custom_reply"
    				type="list"
    				label="COM_CONTACT_FIELD_CONFIG_CUSTOM_REPLY_LABEL"
    				description="COM_CONTACT_FIELD_CONFIG_CUSTOM_REPLY_DESC"
    				useglobal="true"
    				class="chzn-color"
    				>
    				<option value="0">JNO</option>
    				<option value="1">JYES</option>
    			</field>
    
    			<field 
    				name="redirect"
    				type="text"
    				label="COM_CONTACT_FIELD_CONFIG_REDIRECT_LABEL"
    				description="COM_CONTACT_FIELD_CONFIG_REDIRECT_DESC"
    				size="30"
    				useglobal="true"
    			/>
    		</fieldset>
    	</fields>
    </metadata>
  • <?php
    /**
     * @package     Joomla.Site
     * @subpackage  com_contact
     *
     * @copyright   Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved.
     * @license     GNU General Public License version 2 or later; see LICENSE.txt
     */
    defined('_JEXEC') or die;
    $tparams = $this->item->params;
    // Normally set in the *_forms.php
    JHtml::_('behavior.keepalive');
    JHtml::_('behavior.formvalidator');
    ?>
    
    <div class="contact<?php echo $this->pageclass_sfx; ?>" itemscope itemtype="https://schema.org/Person">
    	<?php if ($tparams->get('show_page_heading')) : ?>
    		<h1>
    			<?php echo $this->escape($tparams->get('page_heading')); ?>
    		</h1>
    	<?php endif; ?>
    
    	<?php // If the form is enabled for the user and either a e-mail or a user is set we display a form ?>
    	<?php if ($tparams->get('show_email_form') && ($this->contact->email_to || $this->contact->user_id)) : ?>
    		<div class="contact-form">
    			<form id="contact-form" action="<?php echo JRoute::_('index.php'); ?>" method="post" class="form-validate form-horizontal well">
    			<?php foreach ($this->form->getFieldsets() as $fieldset) : ?>
    				<?php if ($fieldset->name === 'captcha' && !$this->captchaEnabled) : ?>
    					<?php continue; ?>
    				<?php endif; ?>
          		
    				<?php $fields = $this->form->getFieldset($fieldset->name); ?>
    				<?php if (count($fields)) : ?>
    				<fieldset>
                     	 		<?php if (isset($fieldset->label) && ($legend = trim(JText::_($fieldset->label))) !== '') : ?>
    						<legend><?php echo $legend; ?></legend>
    					<?php endif; ?>
    					<?php foreach ($fields as $field) : ?>
    						<?php echo $field->renderField(); ?>
    					<?php endforeach; ?>
    				</fieldset>
    				<?php endif; ?>
    			<?php endforeach; ?>
    				<div class="control-group">
    					<div class="controls">
    						<button class="btn btn-primary validate" type="submit"><?php echo JText::_('COM_CONTACT_CONTACT_SEND'); ?></button>
    						<input type="hidden" name="option" value="com_contact" />
    						<input type="hidden" name="task" value="contact.submit" />
    						<input type="hidden" name="return" value="<?php echo $this->return_page; ?>" />
    						<input type="hidden" name="id" value="<?php echo $this->contact->slug; ?>" />
    						<?php echo JHtml::_('form.token'); ?>
    					</div>
    				</div>
    			</form>
    		</div>
    	<?php endif; ?>
    </div>
  • <?xml version="1.0" encoding="utf-8"?>
    <metadata>
    	<layout title="JoomlaDefault" option="COM_CONTACT_CATEGORY_VIEW_DEFAULT_OPTION">
    		<help
    			key = "JHELP_MENUS_MENU_ITEM_CONTACT_CATEGORY"
    		/>
    		<message>
    			<![CDATA[COM_CONTACT_CATEGORY_VIEW_DEFAULT_DESC]]>
    		</message>
    	</layout>
    
    	<!-- Add fields to the request variables for the layout. -->
    	<fields name="request"
    		addfieldpath="/administrator/components/com_categories/models/fields"
    	>
    		<fieldset name="request"
    			addfieldpath="/administrator/components/com_contact/models/fields"
    		>
    			<field
    				name="id"
    				type="modal_category"
    				label="COM_CONTACT_FIELD_CATEGORY_LABEL"
    				description="COM_CONTACT_FIELD_CATEGORY_DESC"
    				extension="com_contact"
    				required="true"
    				select="true"
    				new="true"
    				edit="true"
    				clear="true"
    			/>
    		</fieldset>
    	</fields>
    
    
    	<!-- Add fields to the parameters object for the layout. -->
    	<fields name="params">
    		<fieldset name="basic" label="JGLOBAL_CATEGORY_OPTIONS">
    
    			<field 
    				name="spacer1" 
    				type="spacer" 
    				label="JGLOBAL_SUBSLIDER_DRILL_CATEGORIES_LABEL"
    				class="text"
    			/>
    
    			<field 
    				name="show_category_title" 
    				type="list"
    				label="JGLOBAL_SHOW_CATEGORY_TITLE"
    				description="JGLOBAL_SHOW_CATEGORY_TITLE_DESC"
    				useglobal="true"
    				class="chzn-color"
    				>
    				<option value="0">JHIDE</option>
    				<option value="1">JSHOW</option>
    			</field>
    
    			<field 
    				name="show_description" 
    				type="list"
    				label="JGLOBAL_SHOW_CATEGORY_DESCRIPTION_LABEL"
    				description="JGLOBAL_SHOW_CATEGORY_DESCRIPTION_DESC"
    				useglobal="true"
    				class="chzn-color"
    				>
    				<option value="0">JHIDE</option>
    				<option value="1">JSHOW</option>
    			</field>
    
    			<field 
    				name="show_description_image" 
    				type="list"
    				label="JGLOBAL_SHOW_CATEGORY_IMAGE_LABEL"
    				description="JGLOBAL_SHOW_CATEGORY_IMAGE_DESC"
    				useglobal="true"
    				class="chzn-color"
    				>
    				<option value="0">JHIDE</option>
    				<option value="1">JSHOW</option>
    			</field>
    
    			<field 
    				name="maxLevel" 
    				type="list"
    				label="JGLOBAL_MAXIMUM_CATEGORY_LEVELS_LABEL"
    				description="JGLOBAL_MAXIMUM_CATEGORY_LEVELS_DESC"
    				useglobal="true"
    				>
    				<option value="-1">JALL</option>
    				<option value="0">JNONE</option>
    				<option value="1">J1</option>
    				<option value="2">J2</option>
    				<option value="3">J3</option>
    				<option value="4">J4</option>
    				<option value="5">J5</option>
    			</field>
    
    			<field 
    				name="show_empty_categories" 
    				type="list"
    				label="JGLOBAL_SHOW_EMPTY_CATEGORIES_LABEL"
    				description="COM_CONTACT_SHOW_EMPTY_CATEGORIES_DESC"
    				useglobal="true"
    				class="chzn-color"
    				>
    				<option value="0">JHIDE</option>
    				<option value="1">JSHOW</option>
    			</field>
    
    
    			<field 
    				name="show_subcat_desc" 
    				type="list"
    				label="JGLOBAL_SHOW_SUBCATEGORIES_DESCRIPTION_LABEL"
    				description="JGLOBAL_SHOW_SUBCATEGORIES_DESCRIPTION_DESC"
    				useglobal="true"
    				class="chzn-color"
    				>
    				<option value="0">JHIDE</option>
    				<option value="1">JSHOW</option>
    			</field>
    
    			<field 
    				name="show_cat_items" 
    				type="list"
    				label="COM_CONTACT_FIELD_SHOW_CAT_ITEMS_LABEL"
    				description="COM_CONTACT_FIELD_SHOW_CAT_ITEMS_DESC"
    				useglobal="true"
    				class="chzn-color"
    				>
    				<option value="0">JHIDE</option>
    				<option value="1">JSHOW</option>
    			</field>
    		</fieldset>
    
    		<fieldset name="advanced" label="JGLOBAL_LIST_LAYOUT_OPTIONS">
    
    			<field 
    				name="spacer2" 
    				type="spacer" 
    				label="JGLOBAL_SUBSLIDER_DRILL_CATEGORIES_LABEL"
    				class="text"
    			/>
    
    			<field
    				name="filter_field"
    				type="list"
    				label="JGLOBAL_FILTER_FIELD_LABEL"
    				description="JGLOBAL_FILTER_FIELD_DESC"
    				default=""
    				useglobal="true"
    				class="chzn-color"
    				>
    				<option value="0">JHIDE</option>
    				<option value="1">JSHOW</option>
    			</field>
    
    			<field 
    				name="show_pagination_limit" 
    				type="list"
    				label="JGLOBAL_DISPLAY_SELECT_LABEL"
    				description="JGLOBAL_DISPLAY_SELECT_DESC"
    				useglobal="true"
    				class="chzn-color"
    				>
    				<option value="0">JHIDE</option>
    				<option value="1">JSHOW</option>
    			</field>
    
    			<field 
    				name="show_headings" 
    				type="list"
    				label="JGLOBAL_SHOW_HEADINGS_LABEL"
    				description="JGLOBAL_SHOW_HEADINGS_DESC"
    				useglobal="true"
    				class="chzn-color"
    				>
    				<option value="0">JHIDE</option>
    				<option value="1">JSHOW</option>
    			</field>
    
    			<field 
    				name="show_image_heading" 
    				type="list"
    				label="COM_CONTACT_FIELD_CONFIG_SHOW_IMAGE_LABEL" 
    				description="COM_CONTACT_FIELD_CONFIG_SHOW_IMAGE_DESC"
    				useglobal="true"
    				class="chzn-color"
    				>
    				<option value="0">JHIDE</option>
    				<option value="1">JSHOW</option>
    			</field>
    
    			<field 
    				name="show_position_headings" 
    				type="list"
    				label="COM_CONTACT_FIELD_CONFIG_POSITION_LABEL"
    				description="COM_CONTACT_FIELD_CONFIG_POSITION_DESC"
    				useglobal="true"
    				class="chzn-color"
    				>
    				<option value="0">JHIDE</option>
    				<option value="1">JSHOW</option>
    			</field>
    
    			<field 
    				name="show_email_headings" 
    				type="list"
    				label="JGLOBAL_EMAIL"
    				description="COM_CONTACT_FIELD_CONFIG_EMAIL_DESC"
    				useglobal="true"
    				class="chzn-color"
    				>
    				<option value="0">JHIDE</option>
    				<option value="1">JSHOW</option>
    			</field>
    
    			<field 
    				name="show_telephone_headings"
    				type="list"
    				label="COM_CONTACT_FIELD_CONFIG_PHONE_LABEL"
    				description="COM_CONTACT_FIELD_CONFIG_PHONE_DESC"
    				useglobal="true"
    				class="chzn-color"
    				>
    				<option value="0">JHIDE</option>
    				<option value="1">JSHOW</option>
    			</field>
    
    			<field 
    				name="show_mobile_headings"
    				type="list"
    				label="COM_CONTACT_FIELD_CONFIG_MOBILE_LABEL"
    				description="COM_CONTACT_FIELD_CONFIG_MOBILE_DESC"
    				useglobal="true"
    				class="chzn-color"
    				>
    				<option value="0">JHIDE</option>
    				<option value="1">JSHOW</option>
    			</field>
    
    			<field 
    				name="show_fax_headings"
    				type="list"
    				label="COM_CONTACT_FIELD_CONFIG_FAX_LABEL"
    				description="COM_CONTACT_FIELD_CONFIG_FAX_DESC"
    				useglobal="true"
    				class="chzn-color"
    				>
    				<option value="0">JHIDE</option>
    				<option value="1">JSHOW</option>
    			</field>
    
    			<field 
    				name="show_suburb_headings" 
    				type="list"
    				label="COM_CONTACT_FIELD_CONFIG_SUBURB_LABEL"
    				description="COM_CONTACT_FIELD_CONFIG_SUBURB_DESC"
    				useglobal="true"
    				class="chzn-color"
    				>
    				<option value="0">JHIDE</option>
    				<option value="1">JSHOW</option>
    			</field>
    
    			<field 
    				name="show_state_headings"
    				type="list"
    				label="COM_CONTACT_FIELD_CONFIG_STATE_LABEL"
    				description="COM_CONTACT_FIELD_CONFIG_STATE_DESC"
    				useglobal="true"
    				class="chzn-color"
    				>
    				<option value="0">JHIDE</option>
    				<option value="1">JSHOW</option>
    			</field>
    
    			<field 
    				name="show_country_headings"
    				type="list"
    				label="COM_CONTACT_FIELD_CONFIG_COUNTRY_LABEL"
    				description="COM_CONTACT_FIELD_CONFIG_COUNTRY_DESC"
    				useglobal="true"
    				class="chzn-color"
    				>
    				<option value="0">JHIDE</option>
    				<option value="1">JSHOW</option>
    			</field>
    
    			<field 
    				name="show_pagination" 
    				type="list"
    				label="JGLOBAL_PAGINATION_LABEL"
    				description="JGLOBAL_PAGINATION_DESC"
    				useglobal="true"
    				>
    				<option value="0">JHIDE</option>
    				<option value="1">JSHOW</option>
    				<option value="2">JGLOBAL_AUTO</option>
    			</field>
    
    			<field
    				name="show_pagination_results"
    				type="list"
    				label="JGLOBAL_PAGINATION_RESULTS_LABEL"
    				description="JGLOBAL_PAGINATION_RESULTS_DESC"
    				useglobal="true"
    				class="chzn-color"
    				>
    				<option value="0">JHIDE</option>
    				<option value="1">JSHOW</option>
    
    			</field>
    
    			<field 
    				name="initial_sort" 
    				type="list"
    				label="COM_CONTACT_FIELD_INITIAL_SORT_LABEL"
    				description="COM_CONTACT_FIELD_INITIAL_SORT_DESC"
    				useglobal="true"
    				>
    				<option value="name">COM_CONTACT_FIELD_VALUE_NAME</option>
    				<option value="sortname">COM_CONTACT_FIELD_VALUE_SORT_NAME</option>
    				<option value="ordering">COM_CONTACT_FIELD_VALUE_ORDERING</option>
    			</field>
    		</fieldset>
    
    		<fieldset name="contact" label="COM_CONTACT_BASIC_OPTIONS_FIELDSET_LABEL"
    			addfieldpath="/administrator/components/com_fields/models/fields">
    			<field 
    				name="presentation_style"
    				type="list"
    				label="COM_CONTACT_FIELD_PRESENTATION_LABEL"
    				description="COM_CONTACT_FIELD_PRESENTATION_DESC"
    				useglobal="true"
    				>
    				<option value="sliders">COM_CONTACT_FIELD_VALUE_SLIDERS</option>
    				<option value="tabs">COM_CONTACT_FIELD_VALUE_TABS</option>
    				<option value="plain">COM_CONTACT_FIELD_VALUE_PLAIN</option>
    			</field>
    
    			<field 
    				name="show_contact_category"
    				type="list"
    				label="COM_CONTACT_FIELD_CONTACT_SHOW_CATEGORY_LABEL"
    				description="COM_CONTACT_FIELD_CONTACT_SHOW_CATEGORY_DESC"
    				useglobal="true"
    				class="chzn-color"
    				>
    				<option value="hide">JHIDE</option>
    				<option value="show_no_link">COM_CONTACT_FIELD_VALUE_NO_LINK</option>
    				<option value="show_with_link">COM_CONTACT_FIELD_VALUE_WITH_LINK</option>
    			</field>
    
    			<field 
    				name="show_contact_list"
    				type="list"
    				label="COM_CONTACT_FIELD_CONTACT_SHOW_LIST_LABEL"
    				description="COM_CONTACT_FIELD_CONTACT_SHOW_LIST_DESC"
    				useglobal="true"
    				class="chzn-color"
    				>
    				<option value="0">JHIDE</option>
    				<option value="1">JSHOW</option>
    			</field>
    
    			<field
    				name="show_tags"
    				type="list"
    				label="COM_CONTACT_FIELD_SHOW_TAGS_LABEL"
    				description="COM_CONTACT_FIELD_SHOW_TAGS_DESC"
    				useglobal="true"
    				class="chzn-color"
    				>
    				<option value="0">JHIDE</option>
    				<option value="1">JSHOW</option>
    			</field>
    
    			<field
    				name="show_info"
    				type="list"
    				label="COM_CONTACT_FIELD_SHOW_INFO_LABEL"
    				description="COM_CONTACT_FIELD_SHOW_INFO_DESC"
    				useglobal="true"
    				class="chzn-color"
    				>
    				<option value="0">JHIDE</option>
    				<option value="1">JSHOW</option>
    			</field>
    
    			<field 
    				name="show_name"
    				type="list"
    				label="COM_CONTACT_FIELD_PARAMS_NAME_LABEL"
    				description="COM_CONTACT_FIELD_PARAMS_NAME_DESC"
    				useglobal="true"
    				showon="show_info:1"
    				class="chzn-color"
    				>
    				<option value="0">JHIDE</option>
    				<option value="1">JSHOW</option>
    			</field>
    
    			<field 
    				name="show_position"
    				type="list"
    				label="COM_CONTACT_FIELD_PARAMS_CONTACT_POSITION_LABEL"
    				description="COM_CONTACT_FIELD_PARAMS_CONTACT_POSITION_DESC"
    				useglobal="true"
    				showon="show_info:1"
    				class="chzn-color"
    				>
    				<option value="0">JHIDE</option>
    				<option value="1">JSHOW</option>
    
    			</field>
    
    			<field 
    				name="show_email"
    				type="list"
    				label="JGLOBAL_EMAIL"
    				description="COM_CONTACT_FIELD_PARAMS_CONTACT_E_MAIL_DESC"
    				useglobal="true"
    				showon="show_info:1"
    				class="chzn-color"
    				>
    				<option value="0">JHIDE</option>
    				<option value="1">JSHOW</option>
    			</field>
    
    			<field 
    				name="show_street_address"
    				type="list"
    				label="COM_CONTACT_FIELD_PARAMS_STREET_ADDRESS_LABEL"
    				description="COM_CONTACT_FIELD_PARAMS_STREET_ADDRESS_DESC"
    				useglobal="true"
    				showon="show_info:1"
    				class="chzn-color"
    				>
    				<option value="0">JHIDE</option>
    				<option value="1">JSHOW</option>
    			</field>
    
    			<field 
    				name="show_suburb"
    				type="list"
    				label="COM_CONTACT_FIELD_PARAMS_TOWN-SUBURB_LABEL"
    				description="COM_CONTACT_FIELD_PARAMS_TOWN-SUBURB_DESC"
    				useglobal="true"
    				showon="show_info:1"
    				class="chzn-color"
    				>
    				<option value="0">JHIDE</option>
    				<option value="1">JSHOW</option>
    			</field>
    
    			<field 
    				name="show_state"
    				type="list"
    				label="COM_CONTACT_FIELD_PARAMS_STATE-COUNTY_LABEL"
    				description="COM_CONTACT_FIELD_PARAMS_STATE-COUNTY_DESC"
    				useglobal="true"
    				showon="show_info:1"
    				class="chzn-color"
    				>
    				<option value="0">JHIDE</option>
    				<option value="1">JSHOW</option>
    			</field>
    
    			<field 
    				name="show_postcode"
    				type="list"
    				label="COM_CONTACT_FIELD_PARAMS_POST-ZIP_CODE_LABEL"
    				description="COM_CONTACT_FIELD_PARAMS_POST-ZIP_CODE_DESC"
    				useglobal="true"
    				showon="show_info:1"
    				class="chzn-color"
    				>
    				<option value="0">JHIDE</option>
    				<option value="1">JSHOW</option>
    			</field>
    
    			<field 
    				name="show_country"
    				type="list"
    				label="COM_CONTACT_FIELD_PARAMS_COUNTRY_LABEL"
    				description="COM_CONTACT_FIELD_PARAMS_COUNTRY_DESC"
    				useglobal="true"
    				showon="show_info:1"
    				class="chzn-color"
    				>
    				<option value="0">JHIDE</option>
    				<option value="1">JSHOW</option>
    			</field>
    
    			<field 
    				name="show_telephone"
    				type="list"
    				label="COM_CONTACT_FIELD_PARAMS_TELEPHONE_LABEL"
    				description="COM_CONTACT_FIELD_PARAMS_TELEPHONE_DESC"
    				useglobal="true"
    				showon="show_info:1"
    				class="chzn-color"
    				>
    				<option value="0">JHIDE</option>
    				<option value="1">JSHOW</option>
    			</field>
    
    			<field 
    				name="show_mobile"
    				type="list"
    				label="COM_CONTACT_FIELD_PARAMS_MOBILE_LABEL"
    				description="COM_CONTACT_FIELD_PARAMS_MOBILE_DESC"
    				useglobal="true"
    				showon="show_info:1"
    				class="chzn-color"
    				>
    				<option value="0">JHIDE</option>
    				<option value="1">JSHOW</option>
    			</field>
    
    			<field 
    				name="show_fax"
    				type="list"
    				label="COM_CONTACT_FIELD_PARAMS_FAX_LABEL"
    				description="COM_CONTACT_FIELD_PARAMS_FAX_DESC"
    				useglobal="true"
    				showon="show_info:1"
    				class="chzn-color"
    				>
    				<option value="0">JHIDE</option>
    				<option value="1">JSHOW</option>
    			</field>
    
    			<field 
    				name="show_webpage"
    				type="list"
    				label="COM_CONTACT_FIELD_PARAMS_WEBPAGE_LABEL"
    				description="COM_CONTACT_FIELD_PARAMS_WEBPAGE_DESC"
    				useglobal="true"
    				showon="show_info:1"
    				class="chzn-color"
    				>
    				<option value="0">JHIDE</option>
    				<option value="1">JSHOW</option>
    			</field>
    
    			<field 
    				name="show_image"
    				type="list"
    				label="COM_CONTACT_FIELD_PARAMS_IMAGE_LABEL"
    				description="COM_CONTACT_FIELD_PARAMS_IMAGE_DESC"
    				useglobal="true"
    				showon="show_info:1"
    				class="chzn-color"
    				>
    				<option value="0">JHIDE</option>
    				<option value="1">JSHOW</option>
    			</field>
    
    			<field 
    				name="allow_vcard"
    				type="list"
    				label="COM_CONTACT_FIELD_PARAMS_VCARD_LABEL"
    				description="COM_CONTACT_FIELD_PARAMS_VCARD_DESC"
    				useglobal="true"
    				class="chzn-color"
    				>
    				<option value="0">JHIDE</option>
    				<option value="1">JSHOW</option>
    			</field>
    
    			<field
    				name="show_misc"
    				type="list"
    				label="COM_CONTACT_FIELD_PARAMS_MISC_INFO_LABEL"
    				description="COM_CONTACT_FIELD_PARAMS_MISC_INFO_DESC"
    				useglobal="true"
    				class="chzn-color"
    				>
    				<option value="0">JHIDE</option>
    				<option value="1">JSHOW</option>
    			</field>
    
    			<field 
    				name="show_articles"
    				type="list"
    				label="COM_CONTACT_FIELD_ARTICLES_SHOW_LABEL"
    				description="COM_CONTACT_FIELD_ARTICLES_SHOW_DESC"
    				useglobal="true"
    				class="chzn-color"
    				>
    				<option value="0">JHIDE</option>
    				<option value="1">JSHOW</option>
    			</field>
    
    			<field 
    				name="articles_display_num" 
    				type="list" 
    				label="COM_CONTACT_FIELD_ARTICLES_DISPLAY_NUM_LABEL"
    				description="COM_CONTACT_FIELD_ARTICLES_DISPLAY_NUM_DESC"
    				default=""
    				useglobal="true"
    				>
    				<option value="use_contact">COM_CONTACT_FIELD_VALUE_USE_CONTACT_SETTINGS</option>
    				<option value="5">J5</option>
    				<option value="10">J10</option>
    				<option value="15">J15</option>
    				<option value="20">J20</option>
    				<option value="25">J25</option>
    				<option value="30">J30</option>
    				<option value="50">J50</option>
    				<option value="75">J75</option>
    				<option value="100">J100</option>
    				<option value="150">J150</option>
    				<option value="200">J200</option>
    				<option value="250">J250</option>
    				<option value="300">J300</option>
    				<option value="0">JALL</option>
    			</field>
    
    			<field 
    				name="show_links"
    				type="list"
    				label="COM_CONTACT_FIELD_SHOW_LINKS_LABEL"
    				description="COM_CONTACT_FIELD_SHOW_LINKS_DESC"
    				useglobal="true"
    				class="chzn-color"
    				>
    				<option value="0">JHIDE</option>
    				<option value="1">JSHOW</option>
    			</field>
    			
    			<field
    				name="show_user_custom_fields"
    				type="fieldgroups"
    				label="COM_CONTACT_FIELD_USER_CUSTOM_FIELDS_SHOW_LABEL"
    				description="COM_CONTACT_FIELD_USER_CUSTOM_FIELDS_SHOW_DESC"
    				multiple="true"
    				context="com_users.user"
    				>
    				<option value="-1">JALL</option>
    			</field>
    
    			<field 
    				name="linka_name"
    				type="text"
    				label="COM_CONTACT_FIELD_LINKA_NAME_LABEL"
    				description="COM_CONTACT_FIELD_LINK_NAME_DESC"
    				size="30"
    				useglobal="true"
    			/>
    
    			<field 
    				name="linkb_name"
    				type="text"
    				label="COM_CONTACT_FIELD_LINKB_NAME_LABEL"
    				description="COM_CONTACT_FIELD_LINK_NAME_DESC"
    				size="30"
    				useglobal="true"
    			/>
    
    			<field 
    				name="linkc_name"
    				type="text"
    				label="COM_CONTACT_FIELD_LINKC_NAME_LABEL"
    				description="COM_CONTACT_FIELD_LINK_NAME_DESC"
    				size="30"
    				useglobal="true"
    			/>
    
    			<field 
    				name="linkd_name"
    				type="text"
    				label="COM_CONTACT_FIELD_LINKD_NAME_LABEL"
    				description="COM_CONTACT_FIELD_LINK_NAME_DESC"
    				size="30"
    				useglobal="true"
    			/>
    
    			<field 
    				name="linke_name"
    				type="text"
    				label="COM_CONTACT_FIELD_LINKE_NAME_LABEL"
    				description="COM_CONTACT_FIELD_LINK_NAME_DESC"
    				size="30"
    				useglobal="true"
    			/>
    		</fieldset>
    		<!-- Form options. -->
    		<fieldset name="Contact_Form" label="COM_CONTACT_MAIL_FIELDSET_LABEL">
    
    			<field 
    				name="show_email_form" 
    				type="list"
    				label="COM_CONTACT_FIELD_EMAIL_SHOW_FORM_LABEL"
    				description="COM_CONTACT_FIELD_EMAIL_SHOW_FORM_DESC"
    				useglobal="true"
    				class="chzn-color"
    				>
    				<option value="0">JHIDE</option>
    				<option value="1">JSHOW</option>
    			</field>
    
    			<field 
    				name="show_email_copy" 
    				type="list"
    				label="COM_CONTACT_FIELD_EMAIL_EMAIL_COPY_LABEL"
    				description="COM_CONTACT_FIELD_EMAIL_EMAIL_COPY_DESC"
    				useglobal="true"
    				class="chzn-color"
    				>
    				<option value="0">JHIDE</option>
    				<option value="1">JSHOW</option>
    			</field>
    
    			<field 
    				name="banned_email" 
    				type="textarea"
    				label="COM_CONTACT_FIELD_CONFIG_BANNED_EMAIL_LABEL"
    				description="COM_CONTACT_FIELD_CONFIG_BANNED_EMAIL_DESC"
    				cols="30"
    				rows="3"
    			/>
    
    			<field 
    				name="banned_subject" 
    				type="textarea"
    				label="COM_CONTACT_FIELD_CONFIG_BANNED_SUBJECT_LABEL"
    				description="COM_CONTACT_FIELD_CONFIG_BANNED_SUBJECT_DESC"
    				cols="30"
    				rows="3"
    			/>
    
    			<field 
    				name="banned_text" 
    				type="textarea"
    				label="COM_CONTACT_FIELD_CONFIG_BANNED_TEXT_LABEL"
    				description="COM_CONTACT_FIELD_CONFIG_BANNED_TEXT_DESC"
    				cols="30"
    				rows="3"
    			/>
    
    			<field 
    				name="validate_session" 
    				type="list"
    				label="COM_CONTACT_FIELD_CONFIG_SESSION_CHECK_LABEL"
    				description="COM_CONTACT_FIELD_CONFIG_SESSION_CHECK_DESC"
    				useglobal="true"
    				class="chzn-color"
    				>
    				<option value="0">JNO</option>
    				<option value="1">JYES</option>
    			</field>
    
    			<field 
    				name="custom_reply" 
    				type="list"
    				label="COM_CONTACT_FIELD_CONFIG_CUSTOM_REPLY_LABEL"
    				description="COM_CONTACT_FIELD_CONFIG_CUSTOM_REPLY_DESC"
    				useglobal="true"
    				class="chzn-color"
    				>
    				<option value="0">JNO</option>
    				<option value="1">JYES</option>
    			</field>
    
    			<field 
    				name="redirect" 
    				type="text"
    				label="COM_CONTACT_FIELD_CONFIG_REDIRECT_LABEL"
    				description="COM_CONTACT_FIELD_CONFIG_REDIRECT_DESC"
    				size="30"
    				useglobal="true"
    			/>
    		</fieldset>
    
    		<fieldset name="integration">
    
    			<field 
    				name="show_feed_link" 
    				type="list"
    				label="JGLOBAL_Show_Feed_Link_Label"
    				description="JGLOBAL_Show_Feed_Link_Desc"
    				useglobal="true"
    				class="chzn-color"
    				>
    				<option value="0">JHIDE</option>
    				<option value="1">JSHOW</option>
    			</field>
    
    		</fieldset>
    	</fields>
    </metadata>
  • <?php
    /**
     * @package     Joomla.Site
     * @subpackage  com_contact
     *
     * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
     * @license     GNU General Public License version 2 or later; see LICENSE.txt
     */
    defined('_JEXEC') or die;
    $this->subtemplatename = 'items';
    echo JLayoutHelper::render('joomla.content.category_default', $this);
  • <?php
    /**
     * @package     Joomla.Site
     * @subpackage  com_contact
     *
     * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
     * @license     GNU General Public License version 2 or later; see LICENSE.txt
     */
    defined('_JEXEC') or die;
    $class = ' class="first"';
    if ($this->maxLevel != 0 && count($this->children[$this->category->id]) > 0) :
    ?>
    <ul class="list-striped list-condensed">
    <?php foreach ($this->children[$this->category->id] as $id => $child) : ?>
    	<?php
    	if ($this->params->get('show_empty_categories') || $child->numitems || count($child->getChildren())) :
    		if (!isset($this->children[$this->category->id][$id + 1]))
    		{
    			$class = ' class="last"';
    		}
    	?>
    	<li<?php echo $class; ?>>
    		<?php $class = ''; ?>
    			<h4 class="item-title">
    				<a href="<?php echo JRoute::_(ContactHelperRoute::getCategoryRoute($child->id)); ?>">
    				<?php echo $this->escape($child->title); ?>
    				</a>
    
    				<?php if ($this->params->get('show_cat_items') == 1) : ?>
    					<span class="badge badge-info pull-right" title="<?php echo JText::_('COM_CONTACT_CAT_NUM'); ?>"><?php echo $child->numitems; ?></span>
    				<?php endif; ?>
    			</h4>
    
    			<?php if ($this->params->get('show_subcat_desc') == 1) : ?>
    				<?php if ($child->description) : ?>
    					<div class="category-desc">
    						<?php echo JHtml::_('content.prepare', $child->description, '', 'com_contact.category'); ?>
    					</div>
    				<?php endif; ?>
    			<?php endif; ?>
    
    			<?php if (count($child->getChildren()) > 0 ) :
    				$this->children[$child->id] = $child->getChildren();
    				$this->category = $child;
    				$this->maxLevel--;
    				echo $this->loadTemplate('children');
    				$this->category = $child->getParent();
    				$this->maxLevel++;
    			endif; ?>
    	</li>
    	<?php endif; ?>
    <?php endforeach; ?>
    </ul>
    <?php endif; ?>
  • <?php
    /**
     * @package     Joomla.Site
     * @subpackage  com_contact
     *
     * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
     * @license     GNU General Public License version 2 or later; see LICENSE.txt
     */
    defined('_JEXEC') or die;
    JHtml::_('behavior.core');
    $listOrder = $this->escape($this->state->get('list.ordering'));
    $listDirn  = $this->escape($this->state->get('list.direction'));
    ?>
    <?php if (empty($this->items)) : ?>
    	<p> <?php echo JText::_('COM_CONTACT_NO_CONTACTS'); ?>	 </p>
    <?php else : ?>
    
    	<form action="<?php echo htmlspecialchars(JUri::getInstance()->toString()); ?>" method="post" name="adminForm" id="adminForm">
    	<?php if ($this->params->get('filter_field') || $this->params->get('show_pagination_limit')) : ?>
    	<fieldset class="filters btn-toolbar">
    		<?php if ($this->params->get('filter_field')) : ?>
    			<div class="btn-group">
    				<label class="filter-search-lbl element-invisible" for="filter-search"><span class="label label-warning"><?php echo JText::_('JUNPUBLISHED'); ?></span><?php echo JText::_('COM_CONTACT_FILTER_LABEL') . '&#160;'; ?></label>
    				<input type="text" name="filter-search" id="filter-search" value="<?php echo $this->escape($this->state->get('list.filter')); ?>" class="inputbox" onchange="document.adminForm.submit();" title="<?php echo JText::_('COM_CONTACT_FILTER_SEARCH_DESC'); ?>" placeholder="<?php echo JText::_('COM_CONTACT_FILTER_SEARCH_DESC'); ?>" />
    			</div>
    		<?php endif; ?>
    
    		<?php if ($this->params->get('show_pagination_limit')) : ?>
    			<div class="btn-group pull-right">
    				<label for="limit" class="element-invisible">
    					<?php echo JText::_('JGLOBAL_DISPLAY_NUM'); ?>
    				</label>
    				<?php echo $this->pagination->getLimitBox(); ?>
    			</div>
    		<?php endif; ?>
    	</fieldset>
    	<?php endif; ?>
    
    		<ul class="category row-striped">
    			<?php foreach ($this->items as $i => $item) : ?>
    
    				<?php if (in_array($item->access, $this->user->getAuthorisedViewLevels())) : ?>
    					<?php if ($this->items[$i]->published == 0) : ?>
    						<li class="row-fluid system-unpublished cat-list-row<?php echo $i % 2; ?>">
    					<?php else : ?>
    						<li class="row-fluid cat-list-row<?php echo $i % 2; ?>" >
    					<?php endif; ?>
    
    					<?php if ($this->params->get('show_image_heading')) : ?>
    						<?php $contact_width = 7; ?>
    						<div class="span2 col-md-2">
    							<?php if ($this->items[$i]->image) : ?>
    								<a href="<?php echo JRoute::_(ContactHelperRoute::getContactRoute($item->slug, $item->catid)); ?>">
    									<?php echo JHtml::_('image', $this->items[$i]->image, JText::_('COM_CONTACT_IMAGE_DETAILS'), array('class' => 'contact-thumbnail img-thumbnail')); ?></a>
    							<?php endif; ?>
    						</div>
    					<?php else : ?>
    						<?php $contact_width = 9; ?>
    					<?php endif; ?>
    
    					<div class="list-title span<?php echo $contact_width; ?> col-md-<?php echo $contact_width; ?>">
    						<a href="<?php echo JRoute::_(ContactHelperRoute::getContactRoute($item->slug, $item->catid)); ?>">
    							<?php echo $item->name; ?></a>
    						<?php if ($this->items[$i]->published == 0) : ?>
    							<span class="label label-warning"><?php echo JText::_('JUNPUBLISHED'); ?></span>
    						<?php endif; ?>
    						<?php echo $item->event->afterDisplayTitle; ?>
    
    						<?php echo $item->event->beforeDisplayContent; ?>
    
    						<?php if ($this->params->get('show_position_headings')) : ?>
    								<?php echo $item->con_position; ?><br />
    						<?php endif; ?>
    						<?php if ($this->params->get('show_email_headings')) : ?>
    								<?php echo $item->email_to; ?><br />
    						<?php endif; ?>
    						<?php $location = array(); ?>
    						<?php if ($this->params->get('show_suburb_headings') && !empty($item->suburb)) : ?>
    							<?php $location[] = $item->suburb; ?>
    						<?php endif; ?>
    						<?php if ($this->params->get('show_state_headings') && !empty($item->state)) : ?>
    							<?php $location[] = $item->state; ?>
    						<?php endif; ?>
    						<?php if ($this->params->get('show_country_headings') && !empty($item->country)) : ?>
    							<?php $location[] = $item->country; ?>
    						<?php endif; ?>
    						<?php echo implode($location, ', '); ?>
    					</div>
    
    					<div class="span3 col-md-3">
    						<?php if ($this->params->get('show_telephone_headings') && !empty($item->telephone)) : ?>
    							<?php echo JText::sprintf('COM_CONTACT_TELEPHONE_NUMBER', $item->telephone); ?><br />
    						<?php endif; ?>
    
    						<?php if ($this->params->get('show_mobile_headings') && !empty ($item->mobile)) : ?>
    								<?php echo JText::sprintf('COM_CONTACT_MOBILE_NUMBER', $item->mobile); ?><br />
    						<?php endif; ?>
    
    						<?php if ($this->params->get('show_fax_headings') && !empty($item->fax) ) : ?>
    							<?php echo JText::sprintf('COM_CONTACT_FAX_NUMBER', $item->fax); ?><br />
    						<?php endif; ?>
    					</div>
    
    					<?php echo $item->event->afterDisplayContent; ?>
    				</li>
    				<?php endif; ?>
    			<?php endforeach; ?>
    		</ul>
    
    		<?php if ($this->params->get('show_pagination', 2)) : ?>
    		<div class="pagination">
    			<?php if ($this->params->def('show_pagination_results', 1)) : ?>
    			<p class="counter">
    				<?php echo $this->pagination->getPagesCounter(); ?>
    			</p>
    			<?php endif; ?>
    			<?php echo $this->pagination->getPagesLinks(); ?>
    		</div>
    		<?php endif; ?>
    		<div>
    			<input type="hidden" name="filter_order" value="<?php echo $listOrder; ?>" />
    			<input type="hidden" name="filter_order_Dir" value="<?php echo $listDirn; ?>" />
    		</div>
    </form>
    <?php endif; ?>


Marco Kamner




Fehler melden

Bitte beachte unsere Datenschutzerklärung

Alle mit * markierten Felder werden benötigt um eine E-Mail zu senden.