Showing posts with label contact. Show all posts
Showing posts with label contact. Show all posts

Wednesday, 8 January 2014

Joomla contacts lists with Photos and misc information

I'm making a website for a client and I want it to be easy for the client to edit the "meet the team" page. Previously I just made an article and add the information in the article and format.

Of course there is the contacts section in Joomla which can be used. A menu item can display all contacts in a list, only problem is also want a photo and the 'misc information' field.

I've looked at a few different extensions, but couldn't find something which simply added these two things to the list view.

I found a forum here which describes how to add the picture to the table in the contacts list view. It involves editing the default_items.php file and inserting:


<th class="item-picture">
   &nbsp;
</th>
<td class="item-picture">
   <?php if ($item->image) : ?>
      <a href="<?php echo JRoute::_(ContactHelperRoute::getContactRoute($item->slug, $item->catid)); ?>">
         <img alt="<?php echo $item->name; ?>" src="<?php echo $item->image; ?>" />
      </a>
   <?php endif; ?> 
</td>

I wonder how hard it is to also get another cell with misc-information in?

To get the misc info in I inserted this code:
<div class="item-misc"> &lt;?php echo $item->misc; ?&gt; </div>


I've also read here that you can override the default_item.php by creating folders with your template directory /com_content/views/featured/

Will need to look into both of these. But not sure if I currently have the time!

So, looking further into it looks like in Joomla 3.2 you can create overrides from within the management system which I found here.

Go into the template files, then there is a tab called "create overrides". Sorted.  I picked the "com_contact" > Featured. This placed some new files in the template directory so that only this template overrides the defaults.

From there you can access the "default_items.php" file.

I basically replaced all li elements with div elements. Then I styled it with CSS

Wednesday, 1 May 2013

Contact forms in Joomla and loading modules inside of articles

So I'm wanting to put a contact form up on a page in Joomla in the main content area. The easiest way looks to involve installing a plugin.

Found this free plugin called Rapid Contact. Once installed it is a module.

To load the module up where the main content should go require a little tweaking. Found this article on it.

Basically you make an article which contains a module position:

{loadposition testposition1}


Make a menu item which loads this article.

Then you make the module have the position "testposition1" and make sure it's loaded with the right menus item.

Done


Just found an even better alternative with Joomla 3. Here's the tutorial. Basically:

  1. Create a Contact and make sure the contact form is set to Show.
  2. Create a menu item to link to that contact!