The Joomla! Forum ™



Forum rules


Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.



Post new topic Reply to topic  [ 16 posts ] 
Author Message
PostPosted: Sat Aug 13, 2011 12:48 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Sat Aug 13, 2011 12:29 pm
Posts: 6
In my joomla site there is a page which lists all the Teachers' Name in our institute in category list layout. In the default layout it lists all the names in one column. What I want to do is list them in two columns. Can somebody help me to get this done?

here is the link to the current page
http://vidupiyasa.com/mgt/index.php?option=com_content&view=category&id=43&Itemid=172


Top
 Profile  
 
PostPosted: Sat Aug 13, 2011 1:15 pm 
User avatar
Joomla! Champion
Joomla! Champion

Joined: Thu Aug 18, 2005 2:09 am
Posts: 5154
Location: California
.
Change it to a Category Blog layout and set it to 2 columns.
Then turn-off anything you do not want to see (e.g. intro text, etc.).


.

_________________
██ AllMedia4Joomla Project
██ http://sourceforge.net/projects/allmedia4joomla/
██ AllMedia YouTube Feed Gallery module released
██ Download: http://sourceforge.net/projects/allmedia4joomla/files/


Top
 Profile  
 
PostPosted: Sat Aug 13, 2011 1:37 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Sat Aug 13, 2011 12:29 pm
Posts: 6
Thnx for prompt response. I tried your suggestion. Then it again shows in one column list as in Category list layout. I changed the Multi Column Order to 'Across' in Parameters (Advanced), but the same result. I can't understand what the reason, pls any suggestions?


Top
 Profile  
 
PostPosted: Sat Aug 13, 2011 2:35 pm 
User avatar
Joomla! Guru
Joomla! Guru

Joined: Mon Sep 20, 2010 7:58 am
Posts: 821
Location: Jakarta - Indonesia
Hi :)

Try to set Author Name to "SHOW" in the Parameters (Component), to see if an additional column will show

EDIT:
I may got it wrong, sorry. Do you want to list the article title in two columns? If so, what I suggested above may be useless.

_________________
Regards,
enbees, http://bayernozone.com


Top
 Profile  
 
PostPosted: Sat Aug 13, 2011 3:00 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Sat Aug 13, 2011 12:29 pm
Posts: 6
enbees,

No, It doesn't work.

here my Parameters (Basic)
Image

I thought this is something related to Template Overrides and need to edit default_items.php file. But I can't figure it out how to do.

Pls your help is needed.


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


Top
 Profile  
 
PostPosted: Sat Aug 13, 2011 3:17 pm 
User avatar
Joomla! Guru
Joomla! Guru

Joined: Mon Sep 20, 2010 7:58 am
Posts: 821
Location: Jakarta - Indonesia
If you want to display:

| # | Article Title | | # |Article Title |

then yes, I think you will need a Template Override (Modify the core)

_________________
Regards,
enbees, http://bayernozone.com


Top
 Profile  
 
PostPosted: Sat Aug 13, 2011 3:25 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Sat Aug 13, 2011 12:29 pm
Posts: 6
Exactly that is what I need.
but,
Im not good in php. Therefore I can't figure out how to edit the code. If someone can pls help me..


Top
 Profile  
 
PostPosted: Sun Aug 14, 2011 12:53 pm 
User avatar
Joomla! Guru
Joomla! Guru

Joined: Mon Sep 20, 2010 7:58 am
Posts: 821
Location: Jakarta - Indonesia
Hi sudeerax
I'm not so sure if the following tweak to J! default_items.php will fully satisfy your requirements, but I do hope it will provide you with some ideas on how to achieve the final goal. You surely can modify it further on your own way. :)
Code:
<?php // no direct access
defined('_JEXEC') or die('Restricted access'); ?>
<script language="javascript" type="text/javascript">

   function tableOrdering( order, dir, task )
   {
      var form = document.adminForm;

      form.filter_order.value    = order;
      form.filter_order_Dir.value   = dir;
      document.adminForm.submit( task );
   }
</script>
<form action="<?php echo $this->action; ?>" method="post" name="adminForm">

<table width="100%" border="0" cellspacing="0" cellpadding="0">
<?php if ($this->params->get('filter') || $this->params->get('show_pagination_limit')) : ?>
<tr>
   <td colspan="5">
      <table width=100% border="0">
      <tr>
      <?php if ($this->params->get('filter')) : ?>
         <td align="left" width="60%" nowrap="nowrap">
            <?php echo JText::_($this->params->get('filter_type') . ' Filter').'&nbsp;'; ?>
            <input type="text" name="filter" value="<?php echo $this->escape($this->lists['filter']);?>" class="inputbox" onchange="document.adminForm.submit();" />
         </td>
      <?php endif; ?>
      <?php if ($this->params->get('show_pagination_limit')) : ?>
         <td align="right" width="40%" nowrap="nowrap">
         <?php
            echo '&nbsp;&nbsp;&nbsp;'.JText::_('Display Num').'&nbsp;';
            echo $this->pagination->getLimitBox();
         ?>
         </td>
      <?php endif; ?>
      </tr>
      </table>
   </td>
</tr>
<?php endif; ?>
</table>

<table width=100%><tr><td  valign="top" width=50%>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<?php if ($this->params->get('show_headings')) : ?>
<tr>
   <td class="sectiontableheader<?php echo $this->escape($this->params->get('pageclass_sfx')); ?>" align="right" width="5%">
      <?php echo JText::_('Num'); ?>
   </td>
   <?php if ($this->params->get('show_title')) : ?>
    <td class="sectiontableheader<?php echo $this->escape($this->params->get('pageclass_sfx')); ?>" >
      <?php echo JHTML::_('grid.sort',  'Item Title', 'a.title', $this->lists['order_Dir'], $this->lists['order'] ); ?>
   </td>
   <?php endif; ?>
   <?php if ($this->params->get('show_date')) : ?>
   <td class="sectiontableheader<?php echo $this->escape($this->params->get('pageclass_sfx')); ?>" width="25%">
      <?php echo JHTML::_('grid.sort',  'Date', 'a.created', $this->lists['order_Dir'], $this->lists['order'] ); ?>
   </td>
   <?php endif; ?>
   <?php if ($this->params->get('show_author')) : ?>
   <td class="sectiontableheader<?php echo $this->escape($this->params->get('pageclass_sfx')); ?>"  width="20%">
      <?php echo JHTML::_('grid.sort',  'Author', 'author', $this->lists['order_Dir'], $this->lists['order'] ); ?>
   </td>
   <?php endif; ?>
   <?php if ($this->params->get('show_hits')) : ?>
   <td align="center" class="sectiontableheader<?php echo $this->escape($this->params->get('pageclass_sfx')); ?>" width="5%" nowrap="nowrap">
      <?php echo JHTML::_('grid.sort',  'Hits', 'a.hits', $this->lists['order_Dir'], $this->lists['order'] ); ?>
   </td>
   <?php endif; ?>

</tr>
<?php endif; ?>

<?php foreach ($this->items as $item) : ?>
<?php if (!$item->odd) : ?>
<tr class="sectiontableentry<?php echo ($item->odd +1 ) . $this->escape($this->params->get('pageclass_sfx')); ?>" >
   <td align="right">
      <?php echo $this->pagination->getRowOffset( $item->count ); ?>
   </td>
   <?php if ($this->params->get('show_title')) : ?>
   <?php if ($item->access <= $this->user->get('aid', 0)) : ?>
   <td>
      <a href="<?php echo $item->link; ?>">
         <?php echo $this->escape($item->title); ?></a>
         <?php $this->item = $item; echo JHTML::_('icon.edit', $item, $this->params, $this->access) ?>
   </td>
   <?php else : ?>
   <td>
      <?php
         echo $this->escape($item->title).' : ';
         $link = JRoute::_('index.php?option=com_user&view=login');
         $returnURL = JRoute::_(ContentHelperRoute::getArticleRoute($item->slug, $item->catslug, $item->sectionid), false);
         $fullURL = new JURI($link);
         $fullURL->setVar('return', base64_encode($returnURL));
         $link = $fullURL->toString();
      ?>
      <a href="<?php echo $link; ?>">
         <?php echo JText::_( 'Register to read more...' ); ?></a>
   </td>
   <?php endif; ?>
   <?php endif; ?>
   <?php if ($this->params->get('show_date')) : ?>
   <td>
      <?php echo $item->created; ?>
   </td>
   <?php endif; ?>
   <?php if ($this->params->get('show_author')) : ?>
   <td >
      <?php echo $this->escape($item->created_by_alias) ? $this->escape($item->created_by_alias) : $this->escape($item->author); ?>
   </td>
   <?php endif; ?>
   <?php if ($this->params->get('show_hits')) : ?>
   <td align="center">
      <?php echo $this->escape($item->hits) ? $this->escape($item->hits) : '-'; ?>
   </td>
   <?php endif; ?>
</tr>
<?php endif; ?>   
<?php endforeach; ?>
</table>
</td><td valign="top" width=50%>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<?php if ($this->params->get('show_headings')) : ?>
<tr>
   <td class="sectiontableheader<?php echo $this->escape($this->params->get('pageclass_sfx')); ?>" align="right" width="5%">
      <?php echo JText::_('Num'); ?>
   </td>
   <?php if ($this->params->get('show_title')) : ?>
    <td class="sectiontableheader<?php echo $this->escape($this->params->get('pageclass_sfx')); ?>" >
      <?php echo JHTML::_('grid.sort',  'Item Title', 'a.title', $this->lists['order_Dir'], $this->lists['order'] ); ?>
   </td>
   <?php endif; ?>
   <?php if ($this->params->get('show_date')) : ?>
   <td class="sectiontableheader<?php echo $this->escape($this->params->get('pageclass_sfx')); ?>" width="25%">
      <?php echo JHTML::_('grid.sort',  'Date', 'a.created', $this->lists['order_Dir'], $this->lists['order'] ); ?>
   </td>
   <?php endif; ?>
   <?php if ($this->params->get('show_author')) : ?>
   <td class="sectiontableheader<?php echo $this->escape($this->params->get('pageclass_sfx')); ?>"  width="20%">
      <?php echo JHTML::_('grid.sort',  'Author', 'author', $this->lists['order_Dir'], $this->lists['order'] ); ?>
   </td>
   <?php endif; ?>
   <?php if ($this->params->get('show_hits')) : ?>
   <td align="center" class="sectiontableheader<?php echo $this->escape($this->params->get('pageclass_sfx')); ?>" width="5%" nowrap="nowrap">
      <?php echo JHTML::_('grid.sort',  'Hits', 'a.hits', $this->lists['order_Dir'], $this->lists['order'] ); ?>
   </td>
   <?php endif; ?>

</tr>
<?php endif; ?>

<?php foreach ($this->items as $item )  : ?>
<?php if ($item->odd) : ?>
<tr class="sectiontableentry<?php echo ($item->odd +1 ) . $this->escape($this->params->get('pageclass_sfx')); ?>" >
   <td align="right">
      <?php echo $this->pagination->getRowOffset( $item->count ); ?>
   </td>
   <?php if ($this->params->get('show_title')) : ?>
   <?php if ($item->access <= $this->user->get('aid', 0)) : ?>
   <td>
      <a href="<?php echo $item->link; ?>">
         <?php echo $this->escape($item->title); ?></a>
         <?php $this->item = $item; echo JHTML::_('icon.edit', $item, $this->params, $this->access) ?>
   </td>
   <?php else : ?>
   <td>
      <?php
         echo $this->escape($item->title).' : ';
         $link = JRoute::_('index.php?option=com_user&view=login');
         $returnURL = JRoute::_(ContentHelperRoute::getArticleRoute($item->slug, $item->catslug, $item->sectionid), false);
         $fullURL = new JURI($link);
         $fullURL->setVar('return', base64_encode($returnURL));
         $link = $fullURL->toString();
      ?>
      <a href="<?php echo $link; ?>">
         <?php echo JText::_( 'Register to read more...' ); ?></a>
   </td>
   <?php endif; ?>
   <?php endif; ?>
   <?php if ($this->params->get('show_date')) : ?>
   <td>
      <?php echo $item->created; ?>
   </td>
   <?php endif; ?>
   <?php if ($this->params->get('show_author')) : ?>
   <td >
      <?php echo $this->escape($item->created_by_alias) ? $this->escape($item->created_by_alias) : $this->escape($item->author); ?>
   </td>
   <?php endif; ?>
   <?php if ($this->params->get('show_hits')) : ?>
   <td align="center">
      <?php echo $this->escape($item->hits) ? $this->escape($item->hits) : '-'; ?>
   </td>
   <?php endif; ?>
</tr>
<?php endif; ?>   
<?php endforeach; ?>
<?php if  (count($this->items) %2) : ?>
<tr class="sectiontableentry<?php echo ($item->odd +1 ) . $this->escape($this->params->get('pageclass_sfx')); ?>" ><td colspan=10>&nbsp;</td></tr>
<?php endif; ?>
</table>
</td></tr></table>

<table width=100%>
<?php if ($this->params->get('show_pagination')) : ?>
<tr>
   <td colspan="5">&nbsp;</td>
</tr>
<tr>
   <td align="center" colspan="4" class="sectiontablefooter<?php echo $this->escape($this->params->get('pageclass_sfx')); ?>">
      <?php echo $this->pagination->getPagesLinks(); ?>
   </td>
</tr>
<tr>
   <td colspan="5" align="right">
      <?php echo $this->pagination->getPagesCounter(); ?>
   </td>
<?php endif; ?>   
</tr>

</table>

<input type="hidden" name="id" value="<?php echo $this->category->id; ?>" />
<input type="hidden" name="sectionid" value="<?php echo $this->category->sectionid; ?>" />
<input type="hidden" name="task" value="<?php echo $this->lists['task']; ?>" />
<input type="hidden" name="filter_order" value="" />
<input type="hidden" name="filter_order_Dir" value="" />
<input type="hidden" name="limitstart" value="0" />
<input type="hidden" name="viewcache" value="0" />
</form>

_________________
Regards,
enbees, http://bayernozone.com


Top
 Profile  
 
PostPosted: Sun Aug 14, 2011 3:05 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Sat Aug 13, 2011 12:29 pm
Posts: 6
thnks enbees,

I will try this


Top
 Profile  
 
PostPosted: Sun Aug 14, 2011 4:22 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Sat Aug 13, 2011 12:29 pm
Posts: 6
Many thanks to enbees, It works perfectly as I wanted.

its time to learn php :D


Top
 Profile  
 
PostPosted: Fri Sep 02, 2011 9:02 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri Jun 10, 2011 8:05 pm
Posts: 11
Hi Enbees,

Can you point out what the specific code was in your amended default items page?

Also, are you able to say where the default_items.php is located, that your talking about. I seem to have several in my installation.

Many thanks,


Top
 Profile  
 
PostPosted: Fri Sep 02, 2011 12:41 pm 
User avatar
Joomla! Guru
Joomla! Guru

Joined: Mon Sep 20, 2010 7:58 am
Posts: 821
Location: Jakarta - Indonesia
dvr_na wrote:
Hi Enbees,

Can you point out what the specific code was in your amended default items page?

Also, are you able to say where the default_items.php is located, that your talking about. I seem to have several in my installation.

Many thanks,


You shouldn't miss the file, we were talking about the category list layout:
components/com_content/views/category/default_item.php

It should be easy enough to compare this two files (original and modified) to identify which changes have been made.

_________________
Regards,
enbees, http://bayernozone.com


Top
 Profile  
 
PostPosted: Tue Nov 22, 2011 5:24 pm 
Joomla! Intern
Joomla! Intern

Joined: Fri Feb 06, 2009 9:33 pm
Posts: 73
Location: Denver
there is no
components/com_content/views/category/default_item.php


Top
 Profile  
 
PostPosted: Fri Mar 16, 2012 2:25 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Wed Sep 29, 2010 1:23 pm
Posts: 11
Is there anyway to do this in J2.5? Seems so simple, yet I'm scratching my head over this. Looks so ugly with just 1 column.


Top
 Profile  
 
PostPosted: Sat Aug 04, 2012 4:53 pm 
User avatar
Joomla! Intern
Joomla! Intern

Joined: Sat May 22, 2010 10:29 pm
Posts: 56
I want to do this as well in a 2.5 site. My goal is to have links to category blog layouts but show the blog page not a single article. This is the only way without a extension and I am trying to limit that and use core components. If I use a category blog layout the title links to the single article losing the effect I want to achieve.

_________________
Hey, careful man, there's a beverage here!


Top
 Profile  
 
PostPosted: Sat Aug 04, 2012 5:03 pm 
User avatar
Joomla! Intern
Joomla! Intern

Joined: Sat May 22, 2010 10:29 pm
Posts: 56
I am going to try a featured article category layout with the link in the text, as title or read more. SEO is confusing me at the moment though. Robots in the articles to no and the menu to yes might work.

_________________
Hey, careful man, there's a beverage here!


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



Who is online

Users browsing this forum: No registered users and 3 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