The Joomla! Forum ™






Post new topic Reply to topic  [ 12 posts ] 
Author Message
PostPosted: Thu Feb 16, 2012 12:00 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Wed Feb 15, 2012 11:51 pm
Posts: 12
I am using the Beez 5 template, Joomla 1.6, to set up a website for a high school summer school. I am using the contacts component to provide information about the classes we offer. When people click to view the information about the class, at the top it says "Contact" and some of them are confused. I would like to set up an alternate contact category layout that would say "Location" instead. I have looked, but can't find where to make this change.

If I have to just delete the word "Contact" I will do that (assuming you can tell me how), but I don't want to change it in the whole layout because I also have actual people as contacts.

Any help you can provide would be much appreciated! Thanks in advance.


Top
 Profile  
 
PostPosted: Thu Feb 16, 2012 12:04 am 
User avatar
Joomla! Master
Joomla! Master

Joined: Sat Apr 05, 2008 9:58 pm
Posts: 23361
Location: @Webdongle
http://docs.joomla.org/How_to_override_ ... omla!_core

_________________
http://weblinksonline.co.uk/joomla-faq.html


Top
 Profile  
 
PostPosted: Thu Feb 16, 2012 12:25 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Wed Feb 15, 2012 11:51 pm
Posts: 12
Thanks. I can see where the alternate file needs to go, but I can't find the file in which the word "contact" actually appears or is called so I can change it. Can you direct me to the specific file I need to edit?

I am attaching a screenshot so you can see what I mean. The courses have their location listed (in the "position" and "telephone" areas), and some of them have additional information as well, but that has "Other information" as a heading, so it's fine.

Thanks again.


You do not have the required permissions to view the files attached to this post.


Top
 Profile  
 
PostPosted: Thu Feb 16, 2012 12:44 am 
User avatar
Joomla! Master
Joomla! Master

Joined: Sat Apr 05, 2008 9:58 pm
Posts: 23361
Location: @Webdongle
Oh you want to just change the word 'Contact' ?
COM_CONTACT_DETAILS="Contact" is the key in the language file that needs to be overridden
http://docs.joomla.org/International_En ... _Overrides
shows how to do it

But if you want to remove it completely you could use a Template override on
/components/com_contact/views/contact/tmpl/default.php

Remove from the override file <legend><?php echo JText::_('COM_CONTACT_FORM_LABEL'); ?></legend>
(line 22)

_________________
http://weblinksonline.co.uk/joomla-faq.html


Top
 Profile  
 
PostPosted: Thu Feb 16, 2012 2:32 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Wed Feb 15, 2012 11:51 pm
Posts: 12
Thanks for the quick reply.

I think the best/easiest thing for me to do is to remove the word "Contact" because changing it for one category and not another seems to be more work.

However, the line you told me to delete wasn't in the file you referenced.

Here is the text of my default.php file:
Quote:
<?php
/**
* $Id: default.php 21101 2011-04-07 15:47:33Z dextercowley $
* @package Joomla.Site
* @subpackage com_contact
* @copyright Copyright (C) 2005 - 2011 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

defined('_JEXEC') or die;

$cparams = JComponentHelper::getParams ('com_media');
?>
<div class="contact<?php echo $this->pageclass_sfx?>">
<?php if ($this->params->get('show_page_heading', 1)) : ?>
<h1>
<?php echo $this->escape($this->params->get('page_heading')); ?>
</h1>
<?php endif; ?>
<?php if ($this->contact->name && $this->params->get('show_name')) : ?>
<h2>
<span class="contact-name"><?php echo $this->contact->name; ?></span>
</h2>
<?php endif; ?>
<?php if ($this->params->get('show_contact_category') == 'show_no_link') : ?>
<h3>
<span class="contact-category"><?php echo $this->contact->category_title; ?></span>
</h3>
<?php endif; ?>
<?php if ($this->params->get('show_contact_category') == 'show_with_link') : ?>
<?php $contactLink = ContactHelperRoute::getCategoryRoute($this->contact->catid);?>
<h3>
<span class="contact-category"><a href="<?php echo $contactLink; ?>">
<?php echo $this->escape($this->contact->category_title); ?></a>
</span>
</h3>
<?php endif; ?>
<?php if ($this->params->get('show_contact_list') && count($this->contacts) > 1) : ?>
<form action="#" method="get" name="selectForm" id="selectForm">
<?php echo JText::_('COM_CONTACT_SELECT_CONTACT'); ?>
<?php echo JHtml::_('select.genericlist', $this->contacts, 'id', 'class="inputbox" onchange="document.location.href = this.value"', 'link', 'name', $this->contact->link);?>
</form>
<?php endif; ?>
<?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; ?>
<?php if ($this->contact->image && $this->params->get('show_image')) : ?>
<div class="contact-image">
<?php echo JHtml::_('image',$this->contact->image, JText::_('COM_CONTACT_IMAGE_DETAILS'), array('align' => 'middle')); ?>
</div>
<?php endif; ?>

<?php if ($this->contact->con_position && $this->params->get('show_position')) : ?>
<p class="contact-position"><?php echo $this->contact->con_position; ?></p>
<?php endif; ?>

<?php echo $this->loadTemplate('address'); ?>

<?php if ($this->params->get('allow_vcard')) : ?>
<?php echo JText::_('COM_CONTACT_DOWNLOAD_INFORMATION_AS');?>
<a href="<?php echo JRoute::_('index.php?option=com_contact&amp;view=contact&amp;id='.$this->contact->id . '&amp;format=vcf'); ?>">
<?php echo JText::_('COM_CONTACT_VCARD');?></a>
<?php endif; ?>
<p></p>
<?php if ($this->params->get('show_email_form') && ($this->contact->email_to || $this->contact->user_id)) : ?>

<?php if ($this->params->get('presentation_style')!='plain'):?>
<?php echo JHtml::_($this->params->get('presentation_style').'.panel', JText::_('COM_CONTACT_EMAIL_FORM'), 'display-form'); ?>
<?php endif; ?>
<?php if ($this->params->get('presentation_style')=='plain'):?>
<?php echo '<h3>'. JText::_('COM_CONTACT_EMAIL_FORM').'</h3>'; ?>
<?php endif; ?>
<?php echo $this->loadTemplate('form'); ?>
<?php endif; ?>
<?php if ($this->params->get('show_links')) : ?>
<?php echo $this->loadTemplate('links'); ?>
<?php endif; ?>
<?php if ($this->params->get('show_articles') && $this->contact->user_id && $this->contact->articles) : ?>
<?php if ($this->params->get('presentation_style')!='plain'):?>
<?php echo JHtml::_($this->params->get('presentation_style').'.panel', JText::_('JGLOBAL_ARTICLES'), 'display-articles'); ?>
<?php endif; ?>
<?php if ($this->params->get('presentation_style')=='plain'):?>
<?php echo '<h3>'. JText::_('JGLOBAL_ARTICLES').'</h3>'; ?>
<?php endif; ?>
<?php echo $this->loadTemplate('articles'); ?>
<?php endif; ?>
<?php if ($this->params->get('show_profile') && $this->contact->user_id && JPluginHelper::isEnabled('user', 'profile')) : ?>
<?php if ($this->params->get('presentation_style')!='plain'):?>
<?php echo JHtml::_($this->params->get('presentation_style').'.panel', JText::_('COM_CONTACT_PROFILE'), 'display-profile'); ?>
<?php endif; ?>
<?php if ($this->params->get('presentation_style')=='plain'):?>
<?php echo '<h3>'. JText::_('COM_CONTACT_PROFILE').'</h3>'; ?>
<?php endif; ?>
<?php echo $this->loadTemplate('profile'); ?>
<?php endif; ?>
<?php if ($this->contact->misc && $this->params->get('show_misc')) : ?>
<?php if ($this->params->get('presentation_style')!='plain'){?>
<?php echo JHtml::_($this->params->get('presentation_style').'.panel', JText::_('COM_CONTACT_OTHER_INFORMATION'), 'display-misc');} ?>
<?php if ($this->params->get('presentation_style')=='plain'):?>
<?php echo '<h3>'. JText::_('COM_CONTACT_OTHER_INFORMATION').'</h3>'; ?>
<?php endif; ?>
<div class="contact-miscinfo">
<div class="<?php echo $this->params->get('marker_class'); ?>">
<?php echo $this->params->get('marker_misc'); ?>
</div>
<div class="contact-misc">
<?php echo $this->contact->misc; ?>
</div>
</div>
<?php endif; ?>
<?php if ($this->params->get('presentation_style')!='plain'){?>
<?php echo JHtml::_($this->params->get('presentation_style').'.end');} ?>
</div>


The word "Contact" is h3, but it's not the contact category referenced above. I created a new category of contacts for the class listings. Am I looking in the wrong place?

I'm sorry if I am not getting it. I am fairly familiar with css, but have never coded in php and I am just trying to figure things out as I go along. I truly appreciate your guidance.


Top
 Profile  
 
PostPosted: Thu Feb 16, 2012 2:56 am 
User avatar
Joomla! Master
Joomla! Master

Joined: Sat Apr 05, 2008 9:58 pm
Posts: 23361
Location: @Webdongle
My bad
/components/com_contact/views/contact/tmpl/default_form.php is the file methinks the <legend> of
<legend><?php echo JText::_('COM_CONTACT_FORM_LABEL'); ?></legend>
gives the h3

_________________
http://weblinksonline.co.uk/joomla-faq.html


Top
 Profile  
 
PostPosted: Tue Feb 21, 2012 12:41 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Wed Feb 15, 2012 11:51 pm
Posts: 12
Hi,

I removed the <legend> text, but there was no change in the display, so I tried duplicating the default view and creating an alternate layout. I was able to add the word "Location" as a header, but it still shows "Contact" right underneath. I am not sure what text to add/change/delete so that it no longer appears.

You can see what it looks like here: http://cms2.knowledgecounts.net/index.php/our-classes/class-lists/38-social-studies-classes/36-test

I am attaching the file with the modified display information here. Thank you so much for your help (and your patience!).




<?php
/**
* $Id: default.php 21101 2011-04-07 15:47:33Z dextercowley $
* @package Joomla.Site
* @subpackage com_contact
* @copyright Copyright (C) 2005 - 2011 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

defined('_JEXEC') or die;

$cparams = JComponentHelper::getParams ('com_media');
?>
<div class="contact<?php echo $this->pageclass_sfx?>">
<?php if ($this->params->get('show_page_heading', 1)) : ?>
<h1>
<?php echo $this->escape($this->params->get('page_heading')); ?>
</h1>
<?php endif; ?>
<?php if ($this->contact->name && $this->params->get('show_name')) : ?>
<h2>
<span class="contact-name"><?php echo $this->contact->name; ?></span>
</h2>
<?php endif; ?>
<?php //I removed both the link and no link contact-category information and added in the Location title below. ?>
<?php echo "<h3>Location</h3>"; ?>
<?php if ($this->params->get('show_contact_list') && count($this->contacts) > 1) : ?>
<form action="#" method="get" name="selectForm" id="selectForm">
<?php echo JText::_('COM_CONTACT_SELECT_CONTACT'); ?>
<?php echo JHtml::_('select.genericlist', $this->contacts, 'id', 'class="inputbox" onchange="document.location.href = this.value"', 'link', 'name', $this->contact->link);?>
</form>
<?php endif; ?>
<?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; ?>
<?php if ($this->contact->image && $this->params->get('show_image')) : ?>
<div class="contact-image">
<?php echo JHtml::_('image',$this->contact->image, JText::_('COM_CONTACT_IMAGE_DETAILS'), array('align' => 'middle')); ?>
</div>
<?php endif; ?>

<?php if ($this->contact->con_position && $this->params->get('show_position')) : ?>
<p class="contact-position"><?php echo $this->contact->con_position; ?></p>
<?php endif; ?>

<?php echo $this->loadTemplate('address'); ?>

<?php if ($this->params->get('allow_vcard')) : ?>
<?php echo JText::_('COM_CONTACT_DOWNLOAD_INFORMATION_AS');?>
<a href="<?php echo JRoute::_('index.php?option=com_contact&amp;view=contact&amp;id='.$this->contact->id . '&amp;format=vcf'); ?>">
<?php echo JText::_('COM_CONTACT_VCARD');?></a>
<?php endif; ?>
<p></p>
<?php if ($this->params->get('show_email_form') && ($this->contact->email_to || $this->contact->user_id)) : ?>

<?php if ($this->params->get('presentation_style')!='plain'):?>
<?php echo JHtml::_($this->params->get('presentation_style').'.panel', JText::_('COM_CONTACT_EMAIL_FORM'), 'display-form'); ?>
<?php endif; ?>
<?php if ($this->params->get('presentation_style')=='plain'):?>
<?php echo '<h3>'. JText::_('COM_CONTACT_EMAIL_FORM').'</h3>'; ?>
<?php endif; ?>
<?php echo $this->loadTemplate('form'); ?>
<?php endif; ?>
<?php if ($this->params->get('show_links')) : ?>
<?php echo $this->loadTemplate('links'); ?>
<?php endif; ?>
<?php if ($this->params->get('show_articles') && $this->contact->user_id && $this->contact->articles) : ?>
<?php if ($this->params->get('presentation_style')!='plain'):?>
<?php echo JHtml::_($this->params->get('presentation_style').'.panel', JText::_('JGLOBAL_ARTICLES'), 'display-articles'); ?>
<?php endif; ?>
<?php if ($this->params->get('presentation_style')=='plain'):?>
<?php echo '<h3>'. JText::_('JGLOBAL_ARTICLES').'</h3>'; ?>
<?php endif; ?>
<?php echo $this->loadTemplate('articles'); ?>
<?php endif; ?>
<?php if ($this->params->get('show_profile') && $this->contact->user_id && JPluginHelper::isEnabled('user', 'profile')) : ?>
<?php if ($this->params->get('presentation_style')!='plain'):?>
<?php echo JHtml::_($this->params->get('presentation_style').'.panel', JText::_('COM_CONTACT_PROFILE'), 'display-profile'); ?>
<?php endif; ?>
<?php if ($this->params->get('presentation_style')=='plain'):?>
<?php echo '<h3>'. JText::_('COM_CONTACT_PROFILE').'</h3>'; ?>
<?php endif; ?>
<?php echo $this->loadTemplate('profile'); ?>
<?php endif; ?>
<?php if ($this->contact->misc && $this->params->get('show_misc')) : ?>
<?php if ($this->params->get('presentation_style')!='plain'){?>
<?php echo JHtml::_($this->params->get('presentation_style').'.panel', JText::_('COM_CONTACT_OTHER_INFORMATION'), 'display-misc');} ?>
<?php if ($this->params->get('presentation_style')=='plain'):?>
<?php echo '<h3>'. JText::_('COM_CONTACT_OTHER_INFORMATION').'</h3>'; ?>
<?php endif; ?>
<div class="contact-miscinfo">
<div class="<?php echo $this->params->get('marker_class'); ?>">
<?php echo $this->params->get('marker_misc'); ?>
</div>
<div class="contact-misc">
<?php echo $this->contact->misc; ?>
</div>
</div>
<?php endif; ?>
<?php if ($this->params->get('presentation_style')!='plain'){?>
<?php echo JHtml::_($this->params->get('presentation_style').'.end');} ?>
</div>


Top
 Profile  
 
PostPosted: Tue Feb 21, 2012 1:15 am 
User avatar
Joomla! Master
Joomla! Master

Joined: Sat Apr 05, 2008 9:58 pm
Posts: 23361
Location: @Webdongle
If this is not it I don't know ?


You do not have the required permissions to view the files attached to this post.

_________________
http://weblinksonline.co.uk/joomla-faq.html


Top
 Profile  
 
PostPosted: Tue Feb 21, 2012 1:35 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Wed Feb 15, 2012 11:51 pm
Posts: 12
No, but thanks for trying.


Top
 Profile  
 
PostPosted: Tue Feb 21, 2012 2:36 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Wed Feb 15, 2012 11:51 pm
Posts: 12
Found it! In line 48 of /components/com_contact/views/contact/tmpl/default.php, I replaced

<?php echo '<h3>'. JText::_('COM_CONTACT_DETAILS').'</h3>'; ?>

with

<?php echo "<h3>Location</h3>; ?>

and uploaded it as an alternate contact layout in /templates/beez5/html/com_contact/contact

Thank you for pointing me in the right direction!


Top
 Profile  
 
PostPosted: Tue Feb 21, 2012 2:54 am 
User avatar
Joomla! Master
Joomla! Master

Joined: Sat Apr 05, 2008 9:58 pm
Posts: 23361
Location: @Webdongle
Your welcome, sorry I could not be more precise.

_________________
http://weblinksonline.co.uk/joomla-faq.html


Top
 Profile  
 
PostPosted: Tue Mar 20, 2012 8:04 am 
Joomla! Intern
Joomla! Intern

Joined: Fri Mar 02, 2012 6:36 am
Posts: 98
administrator\language\en-GB\en-GB.com_contact.sys.ini

COM_CONTACT_CATEGORY_VIEW_DEFAULT_TITLE="List Contacts in a Category"


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 



Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group