[WM] Title metadata overruled by headings in text
Robert Echlin
rechlin at magma.ca
Wed May 19 03:36:20 IST 2004
Robert Echlin wrote:
> Hi,
> I have created a page with headings in the pages.
> The page format was set to text/html.
>
> The title metadata was replaced with the contents of the first sub-hading.
In order to make it do what I wanted,
I changed the middle of the if statement from
&& defined $self->{main}->{metadatas}->{$self->{name}.".title"})
to
|| defined $self->{main}->{metadatas}->{$self->{name}.".title"})
Anybody know why this code expects both these variables to be defined?
And why they might not have been in my system?
It looks to me like they are supposed to be the same item by two
different names.
Thanks
Robert
# -------------------------------------------------------------------------
sub infer_implicit_metas {
my ($self) = @_;
dbg2("NormalContent->infer_implicit_metas");
if (defined $self->{main}->{metadatas}->{"this.title"}
&& defined $self->{main}->{metadatas}->{$self->{name}.".title"})
{
dbg2 ("already got titles for this.title and $self->{name}.title");
return; # no need to infer it, it's already defined
}
# Snarf a default title from the text, if one has not been set.
$self->find_implicit_title_in_text (\$self->{text});
}
--
Robert Echlin
rechlin [at] magma.CA
Personal site: "Some People's Parents" => magma.ca/~rechlin
Company site: OfficeProfessor.CA
More information about the Webmake-talk
mailing list