Ignore:
Timestamp:
2004-10-21T14:25:38+13:00 (20 years ago)
Author:
kjdon
Message:

fixed up the header page stuff with pagedimgplug - docs always have a toplevel section, with all tehimages underneath. if there is text in teh top section, then this becomes a header page, otherwise, this is an invisible page

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/perllib/plugins/PagedImgPlug.pm

    r8365 r8402  
    573573    my $line = "";
    574574    my $num = 0;
    575     my $first = 1;
    576575    while (defined ($line = <ITEMFILE>)) {
    577576    next unless $line =~ /\w/;
     
    588587       
    589588        # create a new section for each image file
    590         # the first image may go in the top section or in the first child section (if headerpage is true)
    591         my $cursection;
    592         if ($first) {
    593         if ( $self->{'headerpage'}) {
    594             $cursection = $doc_obj->insert_section($doc_obj->get_end_child($topsection));
    595         } else {
    596             $cursection = $topsection;
    597         }
    598         $first=0;
    599         } else {
    600         $cursection = $doc_obj->insert_section($doc_obj->get_end_child($topsection));
    601         }
     589        my $cursection = $doc_obj->insert_section($doc_obj->get_end_child($topsection));
    602590        # the page number becomes the Title
    603591        $doc_obj->set_utf8_metadata_element($cursection, 'Title', $pagenum);
     
    626614    close ITEMFILE;
    627615
     616    # if we want a header page, we need to add some text into the top section, otherwise this section will become invisible
     617    if ($self->{'headerpage'}) {
     618    $doc_obj->add_text($topsection, &gsprintf::lookup_string("{BasPlug.dummy_text}"));
     619    }
    628620    $file =~ s/\.item//i;
    629621    $doc_obj->set_OID ();
Note: See TracChangeset for help on using the changeset viewer.