Quantcast
Channel: Joomla! Forum - community, help and support
Viewing all articles
Browse latest Browse all 2381

Administration Joomla! 3.x • Re: Contacts page: How to hide the Form but leave the rest (address, phone, etc) visible ?

$
0
0
If hiding the Contact Form does not work, the html folder of the template may have a com_contact folder, that is a template override, that does not check what has been configured in the Options of Contacts. The following steps show how to create a template override for the Contacts component, if required.

Go to Extensions - Templates - Templates and select the frontend template, then go to the tab Create Overrides and select com_contact - contact from the Components column. This operation will copy several files into the html subfolder of your frontend template.

Use the Editor tab in Templates or the File Manager in the cPanel provided by your host, browse to the html subfolder and find the folder com_contacts/contact. The folder has several files. Leave the file default.php there and delete the other files.

Edit the file default.php and remove the lines 111 to 139, shown below. That will remove the email form.

Code:

<?php if ($tparams->get('show_email_form') && ($this->contact->email_to || $this->contact->user_id)) : ?><?php if ($presentation_style === 'sliders') : ?><?php if (!$accordionStarted){echo JHtml::_('bootstrap.startAccordion', 'slide-contact', array('active' => 'display-form'));$accordionStarted = true;}?><?php echo JHtml::_('bootstrap.addSlide', 'slide-contact', JText::_('COM_CONTACT_EMAIL_FORM'), 'display-form'); ?><?php elseif ($presentation_style === 'tabs') : ?><?php if (!$tabSetStarted){echo JHtml::_('bootstrap.startTabSet', 'myTab', array('active' => 'display-form'));$tabSetStarted = true;}?><?php echo JHtml::_('bootstrap.addTab', 'myTab', 'display-form', JText::_('COM_CONTACT_EMAIL_FORM')); ?><?php elseif ($presentation_style === 'plain') : ?><?php echo '<h3>' . JText::_('COM_CONTACT_EMAIL_FORM') . '</h3>'; ?><?php endif; ?><?php echo $this->loadTemplate('form'); ?><?php if ($presentation_style === 'sliders') : ?><?php echo JHtml::_('bootstrap.endSlide'); ?><?php elseif ($presentation_style === 'tabs') : ?><?php echo JHtml::_('bootstrap.endTab'); ?><?php endif; ?><?php endif; ?>

Statistics: Posted by toivo — Tue Mar 12, 2024 7:19 am



Viewing all articles
Browse latest Browse all 2381

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>