Přihlásit se

Joomla 5.1.0 a Joomla 4.4.4 (17 dub 2024)

Dnes byla uvolněna nová verze Joomla 5.1.0, společně s Joomla 4.4.4. Tato verze přináší spoustu nových funkcí, vylepšení v oblasti bezpečnosti a kódu a díky těmto vylepšením i vyšší rychlost.

Tlačítko "zpět" v článku.

20. zář 2014 17:20 #117974
Tlačítko "zpět" v článku. od Ernst
Joomla Expert
Již několik dní se trápím s tím, jak přidat tlačítko "zpět" do každého článku.
Musím to nastavit v šabloně, která je bohužel historická.

Musím tam doplnit:
<a class="button" href="#" onclick="history.back(); return false;" id="tlacitko_zpet">zpět</a> ,
nebo jsem si nainstaloval modul Back Button, kde stačí jen do config.php v šabloně umístit {backbutton} tag.

Já si do config.php doplnil tlačítko editace (to chybělo), Zobrazení datumu vytvoření a změny.
Ale tohle mi tam nejde dát, pořád to hlásí chyby.

Pomůže mi někdo? Web www.zs-janskeho.cz .

Kód:
<?php
defined('_JEXEC') or die;

require_once dirname(__FILE__) . str_replace('/', DIRECTORY_SEPARATOR, '/../../../functions.php');




$component = new ArtxContent16($this, $this->params);
$article = $component->article($this->item, $this->print);
$params1 = $this->item->params;
JHtml::addIncludePath(JPATH_COMPONENT . '/helpers');


echo $component->beginPageContainer('item-page');
if ($component->showPageHeading && $article->title != $component->pageHeading)
echo $component->pageHeading();
$params = $article->getArticleViewParameters();
if ($article->titleVisible) {
$params = $this->escape($article->title);
if (strlen($article->titleLink))
$params = $article->titleLink;
}
// Change the order of "if" statements to change the order of article metadata header items.
if (!$article->print && $article->showPdfIcon)
$params[] = $article->pdfIcon();
if ($article->showPrintIcon)
$params[] = $article->print ? $article->printScreenIcon() : $article->printPopupIcon();
if (!$article->print && $article->showEmailIcon)
$params[] = $article->emailIcon();
if ($this->item->params->get('access-edit'))
$params[] = $article->editIcon();
if ($article->showHits && $article->hits)
$params[] = $article->hitsInfo();
if ($params1->get('show_create_date'))
$params[] = "Vytvořeno ".JHTML::_('date',$this->item->created, JText::_('DATE_FORMAT_LC4'));
if ($params1->get('show_modify_date'))
$params[] = "Změněno ".JHTML::_('date',$this->item->modified, JText::_('DATE_FORMAT_LC4'));
if ($article->showUrl)
$params[] = $article->urlInfo();
// Build article content
$content = '';
if (!$article->showIntro)
$content .= $article->event('afterDisplayTitle');
$content .= $article->event('beforeDisplayContent');
$content .= $article->toc();
if ($article->showText)
$content .= $article->content();

else if ($article->showTeaser) {
$content .= $article->introText();
if ($this->showReadmore)
$content .= $article->readmore();
}

$content .= $article->event('afterDisplayContent');
$params = $content;
// Render article
echo $article->article($params);
echo $component->endPageContainer();

21. zář 2014 12:17 #117986
Odpověď od Bong
Moderátor
Před 4 roky se tu tlačítko Zpět taky řešilo . Zkuste si to projít, zjistíte, že je to dnes anachronismus. Ale jsou tam i odkazy na pluginy, takže se nemusíte trápit úpravami šablony.

I'm sorry, my responses are limited...you must ask the right questions.

21. zář 2014 12:49 #117990
Odpověď od Ernst
Joomla Expert
Tohle téma jsem si přečetl již před několika dny.
Nainstaloval jsem i extension beck button extensions.joomla.org/extensions/structu...site-navigation/4583 , ale zjistil jsem, že ji neumím použít.
Budu se toho muset ještě hodně naučit ohledně php a css

Powered by Fórum