WBCE CMS Forum

WBCE CMS – Way Better Content Editing.

Du bist nicht angemeldet.

#1 05.06.2020 17:36:52

keepshango
Mitglied

[solved] Remove “read more“ from one accordion header pane

Hi

MY CONFIGURATION
PHP 7.2.24
WBCE CMS 1.4.2 :

Thanks to help on the forum, I change a setting in file “accordion.inc.php“, so that “read more“ link accordion header panes is now translated in my preferred language.

*** Q1 ***
What further coding may be needed if I want to remove this link from one particular pane of the accordion header ?

Regards

Beitrag geändert von keepshango (06.06.2020 11:59:53)

Offline

#2 05.06.2020 18:14:58

bernd
Developer

Re: [solved] Remove “read more“ from one accordion header pane

One possible and flexible way would be:
On top of the file (e.g. after $read_more)  an array which contains the page-id(s) where you don't want the readmore-Link

$aNoReadMore = [17,25,99];

Than modify the $outp (line #77ff - after the comment //Start output) as follows:

$outp .= '<li><div class="hpanel"><img class="panelpic" src="'.$image_dir.'/'.$pic .'" title="'.$titlealt.'" alt="'.$titlealt.'" /><h2>'.$title.'</h2>'.$description;
if (!in_array($pid, $aNoReadMore)) {
     $outp .= '<br /><a href="'.$link.'">'.$read_more.'</a></div></li>';
}

As a result only the pages that are not in the above mentioned array will become the readmore link.


... nein in Europa verwenden wir beim Programmieren nicht € statt $ ...

Offline

Liked by:

florian

#3 06.06.2020 11:59:16

keepshango
Mitglied

Re: [solved] Remove “read more“ from one accordion header pane

It works fine, thanks  smile

Offline

Fußzeile des Forums

up