Remove headings in contact form?

Need help with the Administration of your Joomla! 2.5 site? This is the spot for you.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
johnnybgoodwin
Joomla! Intern
Joomla! Intern
Posts: 62
Joined: Fri Apr 27, 2007 3:18 pm

Remove headings in contact form?

Postby johnnybgoodwin » Sat Sep 10, 2011 3:26 pm

Can anyone tell me how to remove the <h3> headings, "Contact" and "Contact Form" from the standard layout of the contact page?
They appear in totally inappropriate places - order goes,
Name
"CONTACT"
position

Which doesn't look good at all. (IMO)

Thanks a lot in advance for any pointers. Decided to take the plunge into 1.7 and really liking it so far!

John
***** Manual signatures are NOT allowed *****
Sing all the earth

User avatar
john-doe
Joomla! Explorer
Joomla! Explorer
Posts: 372
Joined: Tue Apr 19, 2011 7:39 pm
Location: Colombia

Re: Remove headings in contact form?

Postby john-doe » Sat Sep 10, 2011 5:29 pm

Can you provide us a screen shot?
www.aldemar-hernandez.com - Custom templates and design services.


johnnybgoodwin
Joomla! Intern
Joomla! Intern
Posts: 62
Joined: Fri Apr 27, 2007 3:18 pm

Re: Remove headings in contact form?

Postby johnnybgoodwin » Sat Sep 10, 2011 8:12 pm

Thanks for the fast replies, but I must admint my reaction was,
"Ha! You're kidding me, right?"

Seems I have to learn how to create a .php file and stick it somewhere to remove a heading in the contact page....?
I actually understood some of what those two docs were talking about, and found a file in /home/****/components/com_contact/views/contact/tmpl (which is a joke in itself, when all I want to do is simply delete one heading) called 'default.php' which contains the following:

<?php if ($this->params->get('presentation_style')!='plain'){?>
<?php echo JHtml::_($this->params->get('presentation_style').'.start', 'contact-slider'); ?>
<?php echo JHtml::_($this->params->get('presentation_style').'.panel',JText::_('COM_CONTACT_DETAILS'), 'basic-details'); } ?>
<?php if ($this->params->get('presentation_style')=='plain'):?>
<?php echo '<h3>'. JText::_('COM_CONTACT_DETAILS').'</h3>'; ?>
<?php endif; ?>

If I knew anything about coding, I might know whether this has something to do with the simple problem of having a heading in a stupid place in the plain layout.
Since I know hardly anything about coding, I puzzle over why, when the presentataion style is plain, its starting with a reference to a contact slider, which is a different option.... But then I don't know what all this means.

I'll add a screen shot, to show why this has to be changed. I guess my easy fix is simply to use a different contact page component, or make a form. Especially since the core contact component still doesn't have captcha....

Probably jumped to 1.7 too soon, on reflection.
contactscreenshot.JPG


Still stuck.
You do not have the required permissions to view the files attached to this post.
***** Manual signatures are NOT allowed *****
Sing all the earth

randelld
Joomla! Explorer
Joomla! Explorer
Posts: 411
Joined: Thu Jan 31, 2008 8:45 am

Re: Remove headings in contact form?

Postby randelld » Sat Sep 10, 2011 8:54 pm

I removed them from the contact language file today and it worked a charm. I suppose the correct way would be to use the override file.

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 32834
Joined: Sat Apr 05, 2008 9:58 pm

Re: Remove headings in contact form?

Postby Webdongle » Sat Sep 10, 2011 8:57 pm

johnnybgoodwin wrote:Thanks for the fast replies, but I must admint my reaction was,
"Ha! You're kidding me, right?"

Seems I have to learn how to create a .php file and stick it somewhere to remove a heading in the contact page....?
....

But you asked
Can anyone tell me how to remove the <h3> headings, "Contact" and "Contact Form" from the standard layout of the contact page?
Which suggested you wanted to edit the code not configure options.

http://docs.joomla.org/Help17:Component ... ay_Options may be more what you want ?
Member of Joomla bugsquad
http://www.weblinksonline.co.uk/

johnnybgoodwin
Joomla! Intern
Joomla! Intern
Posts: 62
Joined: Fri Apr 27, 2007 3:18 pm

Re: Remove headings in contact form?

Postby johnnybgoodwin » Mon Sep 12, 2011 3:33 pm

Hi Webdongle

Thanks again for the link, but I understand the display options - problem is that the option to remove the headings is not there.
I was hoping for something like, "go to this file, and delete this line of code...." which is about my level!
Randelld - I'm not sure which bit of which language file you edited. Can you give me the filename, path (and line number even?!).
Appreciate the help.

Cheers

John
***** Manual signatures are NOT allowed *****
Sing all the earth

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 32834
Joined: Sat Apr 05, 2008 9:58 pm

Re: Remove headings in contact form?

Postby Webdongle » Mon Sep 12, 2011 4:57 pm

johnnybgoodwin wrote:....
I was hoping for something like, "go to this file, and delete this line of code...." which is about my level!
....

Not that simple because if you edit a core file then you can loose the edit on an update. Also it depends on which Template you are using, it may already have a Template override. It also depends on which view the page is eg. Article, list or blog etc.

http://docs.joomla.org/Layout_Overrides_in_Joomla_1.6 explains how to do it better than I could explain.

Please note that there is no 'Show Page Heading' in the Article, you will need to have a menu item to it for you to control that setting.
Member of Joomla bugsquad
http://www.weblinksonline.co.uk/

johnnybgoodwin
Joomla! Intern
Joomla! Intern
Posts: 62
Joined: Fri Apr 27, 2007 3:18 pm

Re: Remove headings in contact form?

Postby johnnybgoodwin » Mon Sep 12, 2011 5:45 pm

Hi Again

And thanks again for the additional info. I have to move on. It seems too hard/complicated to make a simple change.
I decided to abandon the Contacts component and embed a contact form module in an article and use that instead.

[Just for the benefit of anyone else who might be looking at this, you can embed a module in an article by using {loadposition any_unique_position_name} as though it was a plug in in an article, then publish the module to that position.]

Cheers

John
***** Manual signatures are NOT allowed *****
Sing all the earth

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 32834
Joined: Sat Apr 05, 2008 9:58 pm

Re: Remove headings in contact form?

Postby Webdongle » Mon Sep 12, 2011 7:16 pm

If you use Aicontactsafe you don't need to use Modules anywhere :D
Member of Joomla bugsquad
http://www.weblinksonline.co.uk/

User avatar
Yasmine
Joomla! Intern
Joomla! Intern
Posts: 72
Joined: Sat Aug 16, 2008 10:20 am
Location: Charleston SC
Contact:

Re: Remove headings in contact form?

Postby Yasmine » Wed Sep 21, 2011 12:37 pm

put this css code inside of your templates css file ...b ;)

div.contact h3 { display: none !important;}

I was shocked also how you cant configure contact form in Joomla 1.7 to not to have any headings .. :eek:

randelld
Joomla! Explorer
Joomla! Explorer
Posts: 411
Joined: Thu Jan 31, 2008 8:45 am

Re: Remove headings in contact form?

Postby randelld » Wed Sep 21, 2011 1:19 pm

The correct way to do this is to add

COM_CONTACT_DETAILS=""

to the en-GB.override.ini
inthe overrides directory

parjoom
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Sun Nov 06, 2011 5:59 am

Re: Remove headings in contact form?

Postby parjoom » Sun Nov 06, 2011 6:43 am

Excellent, it worked. Thanks @randelld

videohead
Joomla! Apprentice
Joomla! Apprentice
Posts: 22
Joined: Fri Apr 21, 2006 6:09 pm
Location: Santa Cruz, CA
Contact:

Re: Remove headings in contact form?

Postby videohead » Wed Jun 26, 2013 3:42 pm

en-GB.override.ini is located in /language in version 2.5
There should be an override directory in there.
If there isn't an en-GB.override.ini file in the override directory, just create a new one with a text editor and add the line:
COM_CONTACT_DETAILS=""

bmpc
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Sun Jun 20, 2010 7:55 am

Re: Remove headings in contact form?

Postby bmpc » Wed May 14, 2014 8:07 pm

It works, but it also leaves two empty <h3></h3> tag pairs in the source code. Online site evaluation tool such as Nibbler would give then an error message like the one below and lower the site score.

Many headings (13.0%) were found to be empty, or incorrectly defined. Empty or invalid headings are of no value to search engines and make a website less accessible.


I think this whole problem could be solved by removing two blocks of code from a file located at:

/components/com_contact/views/contact/tmpl/default.php

but it's not permanent because with each core update Joomla! seems to overwrite this file, so you would have to get back to it and do it again.

First block starting around line 70

Code: Select all

<?php if ($this->params->get('presentation_style') == 'plain'):?>
   <?php  echo '<h3>'. JText::_('COM_CONTACT_DETAILS').'</h3>';  ?>
<?php endif; ?>


Second block starting around line 111

Code: Select all

<?php if ($this->params->get('presentation_style') == 'plain'):?>
   <?php echo '<h3>'. JText::_('COM_CONTACT_EMAIL_FORM').'</h3>';  ?>
<?php endif; ?>


Return to “Administration Joomla! 2.5”

Who is online

Users browsing this forum: No registered users and 5 guests