- ? 'filter.html'
- : 'index.html'
- : sprintf( '%sch%02d.html', $prepend_chapter, $counter - 1 ) );
- $chapter->appendTextChild( 'next_url', sprintf( '%sch%02d.html', $prepend_chapter, $counter + 1 ) );
- $chapter->appendTextChild( 'canonical_url',
- sprintf( 'http://www.exim.org/exim-html-current/doc/html/spec_html/%sch%02d.html', $prepend_chapter, $counter ) );
+ ? 'filter.html'
+ : 'index.html'
+ : sprintf( '%sch-%s.html', $prepend_chapter, $chapter_title_prev ) );
+ $chapter->appendTextChild( 'this_url', sprintf( '%sch-%s.html', $prepend_chapter, $chapter_title ) );
+ $chapter->appendTextChild( 'next_url', sprintf( '%sch-%s.html', $prepend_chapter, $chapter_title_next ) )
+ unless int(@chapters) == $counter;
+ $chapter->appendTextChild( 'toc_url', ( $type eq 'filter' ? 'filter' : 'index' ) . '.html' );
+ $chapter->appendTextChild(
+ 'canonical_url',
+ sprintf(
+ 'http://www.exim.org/exim-html-current/doc/html/spec_html/%sch-%s.html',
+ $prepend_chapter, $chapter_title
+ )
+ );
+ if ( $version ne $opt{latest} ) {
+ $chapter->appendTextChild(
+ 'current_url',
+ sprintf(
+ '../../../../exim-html-current/doc/html/spec_html/%sch-%s.html',
+ $prepend_chapter, $chapter_title
+ )
+ );
+ }