Joomla.it Forum
Joomla! 2.5 (versione con supporto terminato) => Joomla! 1.6/1.7/2.5 => I Template di Joomla 1.6/1.7/2.5 => : milvus 23 May 2013, 01:56:28
-
ciao a tutti, non riesco a mettere i titoli degli articoli con il link all articolo stesso nella homepage, ovviamente ho gia provato dalle impostazioni della home page, ma sembra che il tempalte non abbia questa funzione.. come faccio ad aggiungerla? grazie a tutti
uso jf texturia, e joomla 2.5 in locale
-
Ciao milvus,
difficile aiutarti in maniera precisa senza un link...
Se è vero che il template non ha questa funzione e non dipende invece dal css, potrebbe essere un override alla home. Prova a controllare nella cartella html del template se c'è un file che la sovrascrive.
com_content/featured/ se c'è la trovi sotto quelle cartelle e provi a disabilitarla da remoto.
-
grazie per la risposta... non avevo pensato ancora ad un problema di override... cerco di risolvere cosi, appena faccio qualcosa vi aggiorno
il sito è in locale, quindi non posso dare nessun link per visualizzarlo...
-
purtoppo non riesco a trovare la funzione... potresti darmi una mano? eccoti il template personalizzato da me
template (https://mega.co.nz/#!BJ5RmRDY!eazQyk5yWOMHhkMREhL542rgmYg-TbClXff6wTd-E-I)
vedendo la demo sul sito del template nemmeno li funzionano i link sui titoli, ma non saprei se sono stati disattivati o meno
demo jx texturia (http://www.joomfreak.com/demo/#jf_texturia)
grazie mille
-
No, è che proprio non sono attivi per via dell'ovveride.
Apri la cartella html/com_content/featured (che trovi nella cartella del template)
e poi il fle default_item.php (fattene una copia prima) e sostitisci il codice interamente con questo:
<?php // no direct access
defined('_JEXEC') or die('Restricted access'); ?>
<?php
$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
$words = explode(' ', $this->item->title);
$to_keep = array_slice($words, 1);
$final_string = implode(' ', $to_keep);
?>
<?php if ($this->item->params->get('show_title') || $this->item->params->get('show_pdf_icon') || $this->item->params->get('show_print_icon') || $this->item->params->get('show_email_icon') || $canEdit) : ?>
<table class="contentpaneopen<?php echo $this->escape($this->item->params->get( 'pageclass_sfx' )); ?>">
<tr>
<?php if ($this->item->params->get('show_title')) : ?>
<td class="contentheading<?php echo $this->escape($this->item->params->get( 'pageclass_sfx' )); ?>" width="100%">
<?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; ?>
<?php
$created_date = $this->item->created;
$day = date("d",strtotime($created_date));
$month = date("m",strtotime($created_date));
$mese = array("01"=>"Gennaio","02"=>"Febbraio","03"=>"Marzo","04"=>"Aprile","05"=>"Maggio","06"=>"Giugno","07"=>"Luglio","08"=>"Agosto","09"=>"Settembre","10"=>"Ottobre","11"=>"Novembre","12"=>"Dicembre");
;
?>
<span class="jf-date-content"><?php echo $day; ?><span><?php echo $mese[$month]; ?></span></span>
<?php if ($this->item->params->get('link_titles') && $this->item->readmore_link != '') : ?>
<a href="<?php echo $this->item->readmore_link; ?>" class="contentpagetitle<?php echo $this->escape($this->item->params->get( 'pageclass_sfx' )); ?>">
<?php endif; ?>
</td>
<?php endif; ?>
<?php if ( $this->item->params->get( 'show_print_icon' )) : ?>
<td align="right" width="100%" class="buttonheading">
<div class="print-btn">
<?php echo JHTML::_('icon.print_popup', $this->item, $this->item->params, $this->access); ?>
</div>
</td>
<?php endif; ?>
<?php if ($this->item->params->get('show_email_icon')) : ?>
<td align="right" width="100%" class="buttonheading">
<div class="email-btn">
<?php echo JHTML::_('icon.email', $this->item, $this->item->params, $this->access); ?>
</div>
</td>
<?php endif; ?>
<?php if ($canEdit) : ?>
<td align="right" width="100%" class="buttonheading">
<?php echo JHTML::_('icon.edit', $this->item, $this->item->params, $this->access); ?>
</td>
<?php endif; ?>
</tr>
</table>
<?php endif; ?>
<?php if (!$this->item->params->get('show_intro')) :
echo $this->item->event->afterDisplayTitle;
endif; ?>
<?php echo $this->item->event->beforeDisplayContent; ?>
<table class="contentpaneopen<?php echo $this->escape($this->item->params->get( 'pageclass_sfx' )); ?>">
<?php if (($this->item->params->get('show_section') && $this->item->sectionid) || ($this->item->params->get('show_category') && $this->item->catid)) : ?>
<tr>
<td>
<?php if ($this->item->params->get('show_section') && $this->item->sectionid && isset($this->item->section)) : ?>
<span>
<?php if ($this->item->params->get('link_section')) : ?>
<?php echo '<a href="'.JRoute::_(ContentHelperRoute::getSectionRoute($this->item->sectionid)).'">'; ?>
<?php endif; ?>
<?php echo $this->escape($this->item->section); ?>
<?php if ($this->item->params->get('link_section')) : ?>
<?php echo '</a>'; ?>
<?php endif; ?>
<?php if ($this->item->params->get('show_category')) : ?>
<?php echo ' - '; ?>
<?php endif; ?>
</span>
<?php endif; ?>
<?php if ($this->item->params->get('show_category') && $this->item->catid) : ?>
<span>
<?php if ($this->item->params->get('link_category')) : ?>
<?php echo '<a href="'.JRoute::_(ContentHelperRoute::getCategoryRoute($this->item->catslug, $this->item->sectionid)).'">'; ?>
<?php endif; ?>
<?php echo $this->escape($this->item->category); ?>
<?php if ($this->item->params->get('link_category')) : ?>
<?php echo '</a>'; ?>
<?php endif; ?>
</span>
<?php endif; ?>
</td>
</tr>
<?php endif; ?>
<?php if (($this->item->params->get('show_author')) && ($this->item->author != "")) : ?>
<tr>
<td width="70%" valign="top" colspan="2">
<span class="small">
<?php JText::printf( 'COM_CONTENT_WRITTEN_BY', ($this->escape($this->item->created_by_alias) ? $this->escape($this->item->created_by_alias) : $this->escape($this->item->author)) ); ?>
</span>
<?php endif; ?>
<?php if ($this->item->params->get('show_create_date')) : ?>
<span class="createdate"><?php echo JHTML::_('date', $this->item->created, JText::_('DATE_FORMAT_LC2')); ?></span>
<?php endif; ?>
</td>
</tr>
<?php if ($this->item->params->get('show_url') && $this->item->urls) : ?>
<tr>
<td valign="top" colspan="2">
<a href="http://<?php echo $this->escape($this->item->urls) ; ?>" target="_blank">
<?php echo $this->escape($this->item->urls); ?></a>
</td>
</tr>
<?php endif; ?>
<tr>
<td valign="top" colspan="2">
<?php if (isset ($this->item->toc)) : ?>
<?php echo $this->item->toc; ?>
<?php endif; ?>
<?php echo $this->item->introtext; ?>
</td>
</tr>
<?php if ( intval($this->item->modified) != 0 && $this->item->params->get('show_modify_date')) : ?>
<tr>
<td colspan="2" class="modifydate">
<?php echo JText::sprintf('COM_CONTENT_LAST_UPDATED', JHTML::_('date', $this->item->modified, JText::_('DATE_FORMAT_LC2'))); ?>
</td>
</tr>
<?php endif; ?>
<?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, $this->item->catid));
$link = new JURI($link1);
$link->setVar('return', base64_encode($returnURL));
endif;
?>
<tr>
<td colspan="2">
<a href="<?php echo $link; ?>" class="readon<?php echo $this->escape($this->item->params->get('pageclass_sfx')); ?>">
<?php if (!$params->get('access-view')) :
echo JText::_('COM_CONTENT_REGISTER_TO_READ_MORE');
elseif ($readmore = $this->item->alternative_readmore) :
echo $readmore;
if ($params->get('show_readmore_title', 0) != 0) :
echo JHtml::_('string.truncate', ($this->item->title), $params->get('readmore_limit'));
endif;
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>
</td>
</tr>
<?php endif; ?>
</table>
<?php if ($this->item->state == 0) : ?>
</div>
<?php endif; ?>
<span class="article_separator"> </span>
<?php echo $this->item->event->afterDisplayContent; ?>
i titoli verranno in grigio. Devi poi correggere il css.
-
grazie 1000 davvero :), ho risolto, solo l' articolo principale non è linkato, ma domani vedo le modifiche che hai fatto e le estendo anche a quell articolo
grazie ancora!
-
Puoi sempre mettere articolo principale a 0.
Ricordati il [RISOLTO]. Grazie mille.
-
in che senso mettere l' articolo principale a 0 ???
-
Nelle opzioni di configurazione blog della voce di menù home hai:
articoli principali 1
.
.
ecc.
metti 0. Se è solo il primo che non ha link, tu toglilo. Tanto sono tutti uguali.
-
a capito, grazie ancora.. pero vorrei tenere un altro stile per quell' articolo, con il titolo scritto piu in grande...
e sopratutto gli altri aricoli. li tengo su 2 colonne..
-
Allora devi cambiare il .php effettivamente. :)
-
ovviamente no riesco a risolvere...
il codice che mi hai modificato
<?php if ($this->item->params->get('show_title')) : ?>
<td class="contentheading<?php echo $this->escape($this->item->params->get( 'pageclass_sfx' )); ?>" width="100%">
<?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); ?>[/url]
<?php else : ?>
<?php echo $this->escape($this->item->title); ?>
<?php endif; ?>
<?php
dovrebbe applicare i link su tutti i tioli della classe contentheading, ma non sul primo articolo, che però nel css, è controllato proprio dalla classe contentheading
.contentheading {
padding: 0;
font-family: "ArchitectsDaughterRegular",Arial, Helvetica,sans-serif;
font-size: 28px;
font-weight: normal;
vertical-align: bottom;
color: #fc930a;
text-align: left;
width: 100%;
line-height:32px;
padding-bottom:10px;
}
come mai non mi aggiunge il link anche all articolo principale?
come devo fare??
-
Stasera ci guardo.
-
Semplicemente copia e incolla anche su default_item_lead.php lo stesso .php di prima.
-
quindi il default_item_lead.php si occupa della notizia in cima alla pagina??
non so proprio come ringraziarti :D davvero disponibilissima :D
-
quindi il default_item_lead.php si occupa della notizia in cima alla pagina??
Così pare. :)