WBCE CMS Forum

WBCE CMS – Way Better Content Editing.

You are not logged in.

#1 05.06.2020 18:36:52

keepshango
Member

[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

Last edited by keepshango (06.06.2020 12:59:53)

Offline

#2 05.06.2020 19: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 $ ...

Online

Liked by:

florian

#3 06.06.2020 12:59:16

keepshango
Member

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

It works fine, thanks  smile

Offline

Board footer

Powered by FluxBB

up