webgui/lib/WebGUI/Macro/Spacer.pm
Colin Kuskie 6ded5832ca POD added to last set of Macros.
Internationalized an error message in Product.
Fixed typos in docs in Macro_Product.pm
2005-12-20 22:34:40 +00:00

51 lines
1.4 KiB
Perl

package WebGUI::Macro::Spacer;
#-------------------------------------------------------------------
# WebGUI is Copyright 2001-2005 Plain Black Corporation.
#-------------------------------------------------------------------
# Please read the legal notices (docs/legal.txt) and the license
# (docs/license.txt) that came with this distribution before using
# this software.
#-------------------------------------------------------------------
# http://www.plainblack.com info@plainblack.com
#-------------------------------------------------------------------
use strict;
use WebGUI::Session;
#-------------------------------------------------------------------
=head1 NAME
Package WebGUI::Macro::Spacer
=head1 DESCRIPTION
Macro for outputting a spacer graphic.
=head2 process ( [width, height] )
process takes returns an IMG tag pointing to the spacer gif in the WebGUI
extras directory.
=head3 width
Set the width of the spacer.
=head3 height
Set the height of the spacer.
=cut
sub process {
my ($output, @param, $width, $height);
@param = @_;
$width = $param[0] if defined $param[0];
$height = $param[1] if defined $param[1];
$output = '<img src="'.$session{config}{extrasURL}.'/spacer.gif"'.(defined $width?' width="'.$width.'"':'').(defined $height?' height="'.$height.'"':'').' border="0" alt="" />';
return $output;
}
1;