Fullscreen
Loading...
 
Skip to main content

Maketoc : Displayed number TOC second level

Status
Open
Subject
Maketoc : Displayed number TOC second level
Version
18.x Regression
Category
  • Regression
Resolution status
New
Submitted by
David_Crossman
Lastmod by
David_Crossman
Rating
(0)
Description

Hi Tiki community,

I want to validate if from Tiki 18 the displayed number of a TOC is by default always showing the first Level of a title even if we specify only the second level

La fonction « recherche » dans le moteur de recherche de Foncierpédia


We had in TIki 15 :

TABLE DES MATIÈRES
1. La fonction « recherche » dans le moteur de recherche de Foncierpédia
1. Les mots clés à éviter

Now we have in Tiki18.4

TABLE DES MATIÈRES
1.1. La fonction « recherche » dans le moteur de recherche de Foncierpédia
1.2. Les mots clés à éviter

Part of the code where it seems to make the difference in parserlib.php file : V15

// Update last_hdr info for the next header
$last_hdr = $hdr_structure$nb_hdrs;
$nb_last_hdr = count($last_hdr);


$current_title_real_num = implode('.', $hdr_structure$nb_hdrs).'. ';


// Update the current title number to hide all parents levels numbers if the parent has no autonumbering
$hideall = false;
for ( $j = $hdrlevel ; $j > 0 ; $j-- ) {

if ( $hideall
empty($show_title_level$j) ) {
unset($hdr_structure$nb_hdrs$j - 1);
$hideall = true;
}
}
// Store the title number to use only if it has to be shown (if the '#' char is used)
$current_title_num = $show_title_level$hdrlevel ? implode('.', $hdr_structure$nb_hdrs).'. ' : '';
$nb_hdrs++;
In v18
// Update last_hdr info for the next header
$last_hdr = $hdr_structure$nb_hdrs;
$nb_last_hdr = count($last_hdr);
if (is_array($last_hdr)) {
$current_title_real_num = implode('.', $last_hdr) . '. ';
} else {
$current_title_real_num = $last_hdr . '. ';
}
// Update the current title number to hide all parents levels numbers if the parent has no autonumbering
$hideall = false;
for ($j = $hdrlevel; $j > 0; $j--) {
if ($hideall
empty($show_title_level$j)) {

unset($hdr_structure$j - 1);
$hideall = true;
}
}

// Store the title number to use only if it has to be shown (if the '#' char is used)
$current_title_num = '';
if $hdrlevel) && isset($hdr_structure$nb_hdrs" class="wiki wikinew text-danger tips isset">$show_title_level$hdrlevel) && isset($hdr_structure$nb_hdrs
{
$current_title_num = $show_title_level$hdrlevel ? implode('.', $hdr_structure$nb_hdrs) . '. ' : '';
}

$nb_hdrs++;


Importance
8
Priority
40
Demonstrate Bug on Tiki 19+
Demonstrate Bug (older Tiki versions)
Ticket ID
7240
Created
Thursday 16 January, 2020 20:33:16 UTC
by David_Crossman
LastModif
Thursday 16 January, 2020 20:33:16 UTC


Show PHP error messages