Announcement

  •  » Themes
  •  » [resolved] Show category description on all category pages

#1 2022-01-12 12:56:14

gueba
Member
2021-12-31
55

[resolved] Show category description on all category pages

Hi,

On every theme I know with paginated category pages the category description (and thus every 'additional content') is only shown on the first page.
Why is this and  (how) can this be changed?

I found

Code:

{if !empty($CONTENT_DESCRIPTION)}
<div class="additional_info">
  {$CONTENT_DESCRIPTION}
</div>
{/if}

in 'themes/default/template/index.tpl' which seems to me being responsible for this behaviour - but why should '$CONTENT_DESCRPTION' be not empty on the first, but empty on the following pages?

I'm using the 'elegant' theme. Can I somehow get rid of the pagination?

Any help appreciated,

gueba

    Piwigo 12.2.0 Prüfen, ob eine neue Version verfügbar ist.
    Betriebssystem: Linux
    PHP: 7.4.26 (Info anzeigen) [2022-01-12 12:37:37]
    MySQL: 5.5.5-10.5.11-MariaDB-1:10.5.11+maria~focal-log [2022-01-12 12:37:37]
    Grafikbibliothek: ImageMagick 6.9.10-23
    Größe des Cache nicht vorhanden   nie berechnet Aktualisieren


Piwigo URL: https://bilder.gueba.de

Offline

 

#2 2022-01-14 12:57:30

gueba
Member
2021-12-31
55

Re: [resolved] Show category description on all category pages

Got it! :-)

To show category description on all pages simply add:

Code:

$conf['album_description_on_all_pages'] = true;

to your local config file (using the LocalFiles Editor).

For those interested:
My intention was to show the osm map on top of all pages (it works with the map at the bottom) and I guessed the osm-plugin would use the presence of category description for this. But it's quite simpler:

In 'piwigo-openstreetmap/category.inc.php' edit:

Code:

 ...
              // From index category comment at L300
              if ($page['start']==0 and !isset($page['chronology_field']) )
              {
...

to:

Code:

 ...
              // From index category comment at L300
              if ($page['start']>=0 and !isset($page['chronology_field']) )
              {
...

and voila.

Thanks for your attention

Offline

 
  •  » Themes
  •  » [resolved] Show category description on all category pages

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact