Article Titles and details are sort of in the same line! - Joomla! Forum - community, help and support
hi everyone, i'm quite joomla , php newbie question may rather stupid.
ok i'm trying set category blog. here's issue, when try show details, none of them (other date created) show unless show author (which don't want do!).
so read around , found if change order of details in appropriate php file can @ least move show_author bottom , have details want higher up.
but here's other problem, whatever details choose, end alongside article title, , don't seem on same line. :-s
here's when author hidden (but else on)

here's when author shown, , showing

they cause strange chunk of space above , below title
how can fix this? want category , parent category 1 line below article title! same holds true when article being viewed itself.
can me this? :-d thanks!
also, here code templates\[template]\html\com_content\category\blog_item.php
and \templates\[template]\html\com_content\article
ok i'm trying set category blog. here's issue, when try show details, none of them (other date created) show unless show author (which don't want do!).
so read around , found if change order of details in appropriate php file can @ least move show_author bottom , have details want higher up.
but here's other problem, whatever details choose, end alongside article title, , don't seem on same line. :-s
here's when author hidden (but else on)

here's when author shown, , showing

they cause strange chunk of space above , below title
how can fix this? want category , parent category 1 line below article title! same holds true when article being viewed itself.
can me this? :-d thanks!
also, here code templates\[template]\html\com_content\category\blog_item.php
code: select all
<?php
/**
* @version $id: blog_item.php 20196 2011-01-09 02:40:25z ian $
* @package joomla.site
* @subpackage com_content
* @copyright copyright (c) 2005 - 2011 open source matters, inc. rights reserved.
* @license gnu general public license version 2 or later; see license.txt
*/
// no direct access
defined('_jexec') or die;
// create shortcut params.
$params = &$this->item->params;
$canedit = $this->item->params->get('access-edit');
jhtml::addincludepath(jpath_component.'/helpers/html');
jhtml::_('behavior.tooltip');
jhtml::core();
?>
<?php if ($this->item->state == 0) : ?>
<div class="system-unpublished">
<?php endif; ?>
<?php if ($params->get('show_create_date')) : ?>
<span class="createdate">
<div class="vt_date">
<?php echo jhtml::_('date',$this->item->created, jtext::_('d')); ?>
</div>
<div class="vt_month">
<?php echo jhtml::_('date',$this->item->created, jtext::_('m y ')); ?>
</div>
</span>
<?php endif; ?>
<?php if ($params->get('show_title')) : ?>
<div class="vt_info_date_style">
<span class="contentheading<?php echo $this->escape($this->item->params->get( 'pageclass_sfx' )); ?>">
<?php if ($params->get('link_titles') && $params->get('access-view')) : ?>
<a href="<?php echo jroute::_(contenthelperroute::getarticleroute($this->item->slug, $this->item->catid)); ?>">
<?php echo $this->escape($this->item->title); ?></a>
<?php else : ?>
<?php echo $this->escape($this->item->title); ?>
<?php endif; ?>
</span>
<?php if ($params->get('show_author') && !empty($this->item->author )) : ?>
<span class="small">
<?php $author = $this->item->author; ?>
<?php $author = ($this->item->created_by_alias ? $this->item->created_by_alias : $author);?>
<?php if (!empty($this->item->contactid ) && $params->get('link_author') == true):?>
<?php echo jtext::sprintf('com_content_written_by' ,
jhtml::_('link',jroute::_('index.php?option=com_contact&view=contact&id='.$this->item->contactid),$author)); ?>
<?php else :?>
<?php echo jtext::sprintf('com_content_written_by', $author); ?>
<?php endif; ?>
</span>
<?php echo $this->item->event->beforedisplaycontent; ?>
<?php // not elegant nice group params ?>
<?php if (($params->get('show_author')) or ($params->get('show_category')) or ($params->get('show_create_date')) or ($params->get('show_modify_date')) or ($params->get('show_publish_date')) or ($params->get('show_parent_category')) or ($params->get('show_hits'))) : ?>
<div class="vt_sec_cat">
<?php // <dt class="article-info-term"><?php echo jtext::_('com_content_article_info');</dt> ?>
<?php endif; ?>
<?php if ($params->get('show_parent_category')) : ?>
<span class="parent-category-name">
<?php $title = $this->escape($this->item->parent_title);
$url = '<a href="' . jroute::_(contenthelperroute::getcategoryroute($this->item->parent_id)) . '">' . $title . '</a>'; ?>
<?php if ($params->get('link_parent_category')) : ?>
<?php echo jtext::sprintf('com_content_parent', $url); ?>
<?php else : ?>
<?php echo jtext::sprintf('com_content_parent', $title); ?>
<?php endif; ?>
</span>
<?php endif; ?>
<?php if ($params->get('show_category')) : ?>
<span class="category-name">
<?php $title = $this->escape($this->item->category_title);
$url = '<a href="' . jroute::_(contenthelperroute::getcategoryroute($this->item->catid)) . '">' . $title . '</a>'; ?>
<?php if ($params->get('link_category')) : ?>
<?php echo jtext::sprintf('com_content_category', $url); ?>
<?php else : ?>
<?php echo jtext::sprintf('com_content_category', $title); ?>
<?php endif; ?>
</span>
<?php endif; ?>
<?php if ($params->get('show_modify_date')) : ?>
<span class="modified">
<?php echo jtext::sprintf('com_content_last_updated', jhtml::_('date',$this->item->modified, jtext::_('date_format_lc2'))); ?>
</span>
<?php endif; ?>
<?php if ($params->get('show_publish_date')) : ?>
<span class="published">
<?php echo jtext::sprintf('com_content_published_date', jhtml::_('date',$this->item->publish_up, jtext::_('date_format_lc2'))); ?>
?</span>
<?php endif; ?>
<?php if ($params->get('show_hits')) : ?>
<span class="hits">
<?php echo jtext::sprintf('com_content_article_hits', $this->item->hits); ?>
</span>
<?php endif; ?>
<?php if (($params->get('show_author')) or ($params->get('show_category')) or ($params->get('show_create_date')) or ($params->get('show_modify_date')) or ($params->get('show_publish_date')) or ($params->get('show_parent_category')) or ($params->get('show_hits'))) :?>
</div>
<?php endif; ?>
<?php endif; ?>
</div>
<div style="clear:both;"></div>
<?php endif; ?>
<?php if ($params->get('show_print_icon') || $params->get('show_email_icon') || $canedit) : ?>
<ul class="actions">
<?php if ($params->get('show_print_icon')) : ?>
<li class="print-icon">
<?php echo jhtml::_('icon.print_popup', $this->item, $params); ?>
</li>
<?php endif; ?>
<?php if ($params->get('show_email_icon')) : ?>
<li class="email-icon">
<?php echo jhtml::_('icon.email', $this->item, $params); ?>
</li>
<?php endif; ?>
<?php if ($canedit) : ?>
<li class="edit-icon">
<?php echo jhtml::_('icon.edit', $this->item, $params); ?>
</li>
<?php endif; ?>
</ul>
<?php endif; ?>
<?php if (!$params->get('show_intro')) : ?>
<?php echo $this->item->event->afterdisplaytitle; ?>
<?php endif; ?>
<?php echo $this->item->introtext; ?>
<?php if ($params->get('show_readmore') && $this->item->readmore) :
if ($params->get('access-view')) :
$link = jroute::_(contenthelperroute::getarticleroute($this->item->slug, $this->item->catid));
else :
$menu = jfactory::getapplication()->getmenu();
$active = $menu->getactive();
$itemid = $active->id;
$link1 = jroute::_('index.php?option=com_users&view=login&itemid=' . $itemid);
$returnurl = jroute::_(contenthelperroute::getarticleroute($this->item->slug));
$link = new juri($link1);
$link->setvar('return', base64_encode($returnurl));
endif;
?>
<span class="readmore">
<a href="<?php echo $link; ?>">
<?php if (!$params->get('access-view')) :
echo jtext::_('com_content_register_to_read_more');
elseif ($readmore = $this->item->alternative_readmore) :
echo $readmore;
echo jhtml::_('string.truncate', ($this->item->title), $params->get('readmore_limit'));
elseif ($params->get('show_readmore_title', 0) == 0) :
echo jtext::sprintf('com_content_read_more_title');
else :
echo jtext::_('com_content_read_more');
echo jhtml::_('string.truncate', ($this->item->title), $params->get('readmore_limit'));
endif; ?></a>
</span>
<?php endif; ?>
<?php if ($this->item->state == 0) : ?>
</div>
<?php endif; ?>
<div class="item-separator"></div>
<?php echo $this->item->event->afterdisplaycontent; ?>
and \templates\[template]\html\com_content\article
code: select all
<?php
/**
* @version $id: default.php 20196 2011-01-09 02:40:25z ian $
* @package joomla.site
* @subpackage com_content
* @copyright copyright (c) 2005 - 2011 open source matters, inc. rights reserved.
* @license gnu general public license version 2 or later; see license.txt
*/
// no direct access
defined('_jexec') or die;
jhtml::addincludepath(jpath_component.ds.'helpers');
// create shortcuts parameters.
$params = $this->item->params;
$canedit = $this->item->params->get('access-edit');
?>
<div class="item-page<?php echo $this->pageclass_sfx?>">
<?php if ($this->params->get('show_page_heading', 1)) : ?>
<div class="vt_heading_style">
<h3><span class="vt_heading1"><span class="vt_heading2">
<?php echo $this->escape($this->params->get('page_heading')); ?>
</span></span></h3>
</div>
<?php endif; ?>
<?php if ($params->get('show_create_date')) : ?>
<span class="createdate">
<div class="vt_date">
<?php echo jhtml::_('date',$this->item->created, jtext::_('d')); ?>
</div>
<div class="vt_month">
<?php echo jhtml::_('date',$this->item->created, jtext::_('m y ')); ?>
</div>
</span>
<?php endif; ?>
<?php if ($params->get('show_title')|| $params->get('access-edit')) : ?>
<div class="vt_info_date_style">
<span class="contentheading<?php echo $this->escape($this->item->params->get( 'pageclass_sfx' )); ?>">
<?php if ($params->get('link_titles') && !empty($this->item->readmore_link)) : ?>
<a href="<?php echo $this->item->readmore_link; ?>">
<?php echo $this->escape($this->item->title); ?></a>
<?php else : ?>
<?php echo $this->escape($this->item->title); ?>
<?php endif; ?>
</span>
<?php if ($params->get('show_author') && !empty($this->item->author )) : ?>
<span class="small">
<?php $author = $this->item->author; ?>
<?php $author = ($this->item->created_by_alias ? $this->item->created_by_alias : $author);?>
<?php if (!empty($this->item->contactid ) && $params->get('link_author') == true):?>
<?php echo jtext::sprintf('com_content_written_by' ,
jhtml::_('link',jroute::_('index.php?option=com_contact&view=contact&id='.$this->item->contactid),$author)); ?>
<?php else :?>
<?php echo jtext::sprintf('com_content_written_by', $author); ?>
<?php endif; ?>
</span>
<?php echo $this->item->event->beforedisplaycontent; ?>
<?php $usedeflist = (($params->get('show_author')) or ($params->get('show_category')) or ($params->get('show_parent_category'))
or ($params->get('show_create_date')) or ($params->get('show_modify_date')) or ($params->get('show_publish_date'))
or ($params->get('show_hits'))); ?>
<?php if ($usedeflist) : ?>
<div class="vt_sec_cat">
<?php // <dt class="article-info-term"><?php echo jtext::_('com_content_article_info'); </dt> ?>
<?php endif; ?>
<?php if ($params->get('show_parent_category') && $this->item->parent_slug != '1:root') : ?>
<span class="parent-category-name">
<?php $title = $this->escape($this->item->parent_title);
$url = '<a href="'.jroute::_(contenthelperroute::getcategoryroute($this->item->parent_slug)).'">'.$title.'</a>';?>
<?php if ($params->get('link_parent_category') , $this->item->parent_slug) : ?>
<?php echo jtext::sprintf('com_content_parent', $url); ?>
<?php else : ?>
<?php echo jtext::sprintf('com_content_parent', $title); ?>
<?php endif; ?>
</span>
<?php endif; ?>
<?php if ($params->get('show_category')) : ?>
<span class="category-name">
<?php $title = $this->escape($this->item->category_title);
$url = '<a href="'.jroute::_(contenthelperroute::getcategoryroute($this->item->catslug)).'">'.$title.'</a>';?>
<?php if ($params->get('link_category') , $this->item->catslug) : ?>
<?php echo jtext::sprintf('com_content_category', $url); ?>
<?php else : ?>
<?php echo jtext::sprintf('com_content_category', $title); ?>
<?php endif; ?>
</span>
<?php endif; ?>
<?php if ($params->get('show_modify_date')) : ?>
<span class="modified">
<?php echo jtext::sprintf('com_content_last_updated', jhtml::_('date',$this->item->modified, jtext::_('date_format_lc2'))); ?>
</span>
<?php endif; ?>
<?php if ($params->get('show_publish_date')) : ?>
<span class="published">
<?php echo jtext::sprintf('com_content_published_date', jhtml::_('date',$this->item->publish_up, jtext::_('date_format_lc2'))); ?>
</span>
<?php endif; ?>
<?php if ($params->get('show_hits')) : ?>
<span class="hits">
<?php echo jtext::sprintf('com_content_article_hits', $this->item->hits); ?>
</span>
<?php endif; ?>
<?php if ($usedeflist) : ?>
</div>
<?php endif; ?>
<?php endif; ?>
</div>
<div style="clear:both;"></div>
<?php endif; ?>
<?php if ($canedit || $params->get('show_print_icon') || $params->get('show_email_icon')) : ?>
<ul class="actions">
<?php if (!$this->print) : ?>
<?php if ($params->get('show_print_icon')) : ?>
<li class="print-icon">
<?php echo jhtml::_('icon.print_popup', $this->item, $params); ?>
</li>
<?php endif; ?>
<?php if ($params->get('show_email_icon')) : ?>
<li class="email-icon">
<?php echo jhtml::_('icon.email', $this->item, $params); ?>
</li>
<?php endif; ?>
<?php if ($canedit) : ?>
<li class="edit-icon">
<?php echo jhtml::_('icon.edit', $this->item, $params); ?>
</li>
<?php endif; ?>
<?php else : ?>
<li>
<?php echo jhtml::_('icon.print_screen', $this->item, $params); ?>
</li>
<?php endif; ?>
</ul>
<?php endif; ?>
<?php if (!$params->get('show_intro')) :
echo $this->item->event->afterdisplaytitle;
endif; ?>
<?php if (isset ($this->item->toc)) : ?>
<?php echo $this->item->toc; ?>
<?php endif; ?>
<?php echo $this->item->text; ?>
<?php echo $this->item->event->afterdisplaycontent; ?>
</div>
the title using span class contentheading, can try add in
into template.css file see if helps out.
code: select all
span.contentheading{display:block;}into template.css file see if helps out.
Comments
Post a Comment