GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Toader::Render::General(3) User Contributed Perl Documentation Toader::Render::General(3)

Toader::Render::General - Renders various general stuff for Toader as well as some other stuff.

Version 0.5.0

This initiates the object.

args hash ref

toader

This is the Toader object.

obj

This is the Toader object being worked with.

toDir

This is the path to use for getting back down to the directory.

Lets say we have rendered a single entry to it's page, then it would be "../../", were as if we rendered a page of multiple entries it would be "../".

The default is "../../".

This is set to '' if fullURL is set to true.

fullURL

This is if it should make a non-relative link for when generating links. If set to 1, it makes links non-relative. If not defined/false it uses relative links.

dir

This is the directory that it is currently in. This can differ from the object directory and if not defined will be set to the object directory, which is found via $args{obj}->dirGet.

    my $g=Toader::Render::General->new(\%args);
    if($g->error){
        warn('error: '.$g->error.":".$g->errorString);
    }
This generates a link to the the specified documentation file.

Three arguments are taken. The first is the relative directory to the Toader root in which it resides, which if left undefined is the same as the object used to initiate this object. The second is file found by autodoc. The third is the text for the link, which if left undefined is the same as the file.

If the text is left undefined and the file ends in ".html", the ".html" part is removed.

    $g->cdlink( $directory,  $file, $text );

The template used for this is 'linkDirectory', which by default is as below.

    <a href="[== $url ==]">[== $text ==]</a>

The variables passed to it are as below.

    url - This is the relative URL for this.
    text - This to use for with the link.
    toDir - This is the relative back to the directory.
    toFiles - This is the relative path to the '.files' directory.
    c - The L<Config::Tiny> object containing the Toader config.
    self - The L<Toader::Render::General> object.
    toader - This is a L<Toader> object.
    g - This is a L<Toader::Render::General> object.
        obj - This is the object that Toader was initiated with.
This returns a link to the documentation list.

The template used for this is 'linkAutoDocList', which by default is as below.

    <a href="[== $url ==]">[== $text ==]</a>

The variables passed to it are as below.

    url - This is the relative URL for this.
    text - This to use for with the link.
    toDir - This is the relative back to the directory.
    toFiles - This is the relative path to the '.files' directory.
    c - The L<Config::Tiny> object containing the Toader config.
    self - The L<Toader::Render::General> object.
    toader - This is a L<Toader> object.
    g - This is a L<Toader::Render::General> object.
    obj - This is the object that Toader was initiated with.

This returns a Perl boolean value for if the current directory is the root Toader directory or not.

    my $atRoot=$g->atRoot;
    if ( $aRoot ){
        print "At root.\n";
    }
Used for generating the author line.

This parses a From header, such as the value returned from Toader::Entry->fromGet.

One value is requied and that is what is to be parsed and returned as a link.

    $g->authorsLink($entry->fromGet);

Templates

authorBegin

This begins the authors link section.

The default template is blank.

The variables passed to it are as below.

    toDir - This is the relative back to the directory.
    toFiles - This is the relative path to the '.files' directory.
    obj - This is the object that it was invoked for.
    c - The L<Config::Tiny> object containing the Toader config.
    toader - This is a L<Toader> object.
    self - This the L<Toader::Render::General> object.
    g - This the L<Toader::Render::General> object.

authorLink

This is a link for one of the authors.

The default template is as below.

    <a href="mailto:[== $address ==]">[== $name ==]</a>

The variables passed to it are as below.

    toDir - This is the relative back to the directory.
    toFiles - This is the relative path to the '.files' directory.
    obj - This is the object that it was invoked for.
    c - The L<Config::Tiny> object containing the Toader config.
    toader - This is a L<Toader> object.
    self - This the L<Toader::Render::General> object.
    g - This the L<Toader::Render::General> object.
    address - The email address of the author.
    comment - The comment portion of it.
    original - The original form for this chunk.
    name - The name of the author.

authorJoin

This is used for joining multiple authors.

The default template is as below.

    ,

The variables passed to it are as below.

The variables passed to it are as below.

    toDir - This is the relative back to the directory.
    toFiles - This is the relative path to the '.files' directory.
    obj - This is the object that it was invoked for.
    c - The L<Config::Tiny> object containing the Toader config.
    toader - This is a L<Toader> object.
    self - This the L<Toader::Render::General> object.
    g - This the L<Toader::Render::General> object.

authorEnd

This ends the authors link section.

The default template is blank.

The variables passed to it are as below.

    toDir - This is the relative back to the directory.
    toFiles - This is the relative path to the '.files' directory.
    obj - This is the object that it was invoked for.
    c - The L<Config::Tiny> object containing the Toader config.
    toader - This is a L<Toader> object.
    self - This the L<Toader::Render::General> object.
    g - This the L<Toader::Render::General> object.

This a list of generates a table of the various documents.

One argument is accepted and the directory under the l<Toader> root directory. If not specified, it is the same as object used to initate this object.

    $g->autodocList;

Templates

autodocListBegin

This initiates the table for the list.

The default template is as below.

    <table id="autodocList">
      <tr> <td>File</td> </tr>

The variables passed to it are as below.

    toDir - This is the relative back to the directory.
    toFiles - This is the relative path to the '.files' directory.
    obj - This is the object that it was invoked for.
    c - The L<Config::Tiny> object containing the Toader config.
    toader - This is a L<Toader> object.
    self - This the L<Toader::Render::General> object.
    g - This the L<Toader::Render::General> object.
    dir - This is the directory relative to the root L<Toader> directory.

autodocListRow

This is the represents a row in the document table.

The default template is as below.

      <tr id="autodocList">
        <td id="autodocList">[== $g->adlink( $dir, $file ) ==]</td>
      </tr>

The variables passed to it are as below.

    toDir - This is the relative back to the directory.
    toFiles - This is the relative path to the '.files' directory.
    obj - This is the object that it was invoked for.
    c - The L<Config::Tiny> object containing the Toader config.
    toader - This is a L<Toader> object.
    self - This the L<Toader::Render::General> object.
    g - This the L<Toader::Render::General> object.
    dir - This is the directory relative to the root L<Toader> directory.
    file - This is the file to show.

autodocListJoin

This is used to join the table rows.

The default template is blank.

The variables passed to it are as below.

    toDir - This is the relative back to the directory.
    toFiles - This is the relative path to the '.files' directory.
    obj - This is the object that it was invoked for.
    c - The L<Config::Tiny> object containing the Toader config.
    toader - This is a L<Toader> object.
    self - This the L<Toader::Render::General> object.
    g - This the L<Toader::Render::General> object.
    dir - This is the directory relative to the root L<Toader> directory.

autodocListEnd

This is ends the documentation list.

The default template is as below.

    </table>

The variables passed to it are as below.

    toDir - This is the relative back to the directory.
    toFiles - This is the relative path to the '.files' directory.
    obj - This is the object that it was invoked for.
    c - The L<Config::Tiny> object containing the Toader config.
    toader - This is a L<Toader> object.
    self - This the L<Toader::Render::General> object.
    g - This the L<Toader::Render::General> object.
    dir - This is the directory relative to the root L<Toader> directory.

This returns the current value to get back to the root.

    my $b2r=$g->b2r;
This generates a link to the current directory.

There is one option arguement. This is the text for the link. If not specified, it defaults to ".".

    $g->cdlink( "to current directory" );

The template used for this is 'linkDirectory', which by default is as below.

    <a href="[== $url ==]">[== $text ==]</a>

The variables passed to it are as below.

    url - This is the relative URL for this.
    text - This to use for with the link.
    toDir - This is the relative back to the directory.
    toFiles - This is the relative path to the '.files' directory.
    obj - The L<Toader::Entry> object.
    c - The L<Config::Tiny> object containing the Toader config.
    self - The L<Toader::Render::Entry> object.
    toader - This is a L<Toader> object.
    g - This is a L<Toader::Render::General> object.
This renders the copyright string for at the bottom of a page.

One optional argument is taken, this is a boolean value that if defined will override the "showCopyright" setting in the config.

The default template is as below.

    <div id="copyright">
     [==
       my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst)=localtime(time);
       $year=$year+1900;
       return "Copyright ".$year." ".$c->{_}->{owner};
      ==]
    </div

The passed variables are as below.

    toDir - This is the relative back to the directory.
    toFiles - This is the relative path to the '.files' directory.
    obj - The being rendered object.
    c - The L<Config::Tiny> object containing the L<Toader> config.
    self - The L<Toader::Render::Entry> object.
    toader - This is a L<Toader> object.
    g - This is a L<Toader::Render::General> object.

This renders the CSS template and returns it.

    $g->css;

For more information on the CSS template and rendering please see 'Documentation/CSS.pod'.

This returns the relative location to a the CSS file.

    $g->cssLocation;
This generates a link to a different directory object.

Two arguments are taken.

The first and required one is the Toader directory to link to. This needs to be relative.

The second is the text, which if not specified will will be the same the link.

    $g->link( "./foo/bar", "more info on foo/bar" );

The template used for this is 'linkDirectory', which by default is as below.

    <a href="[== $url ==]">[== $text ==]</a>

The variables passed to it are as below.

    url - This is the relative URL for this.
    text - This to use for with the link.
    toDir - This is the relative back to the directory.
    toFiles - This is the relative path to the '.files' directory.
    obj - The L<Toader::Entry> object.
    c - The L<Config::Tiny> object containing the L<Toader> config.
    self - The L<Toader::Render::Entry> object.
    toader - This is a L<Toader> object.
    g - This is a L<Toader::Render::General> object.
This generates a link to a different directory object.

Two arguments are taken.

The first and required one is the Toader directory containing the Toader object. This needs to be relative.

The second is the entry to link to.

The third is the text, which if not specified will will be the same the link.

    $g->link( $dir, $entryID, "whatever at foo.bar" );

The template used is 'linkEntry' and the default is as below.

    <a href="[== $url ==]">[== $text ==]</a>

The variables passed are as below.

    url - This is the relative URL for this.
    text - This to use for with the link.
    toDir - This is the relative back to the directory.
    toFiles - This is the relative path to the '.files' directory.
    obj - The L<Toader::Entry> object.
    c - The L<Config::Tiny> object containing the L<Toader> config.
    self - The L<Toader::Render::Entry> object.
    toader - This is a L<Toader> object.
    g - This is a L<Toader::Render::General> object.

This creates the entry archive for the current directory.

No arguments are taken.

    $g->entryArchive;

Templates

entryArchiveBegin

This begins the entry archive table.

    <table id="entryArchive">
      <tr> <td>Date</td> <td>Title</td> <td>Summary</td> </tr>

The variables passed to it are as below.

    toDir - This is the relative back to the directory.
    toFiles - This is the relative path to the '.files' directory.
    obj - This is the object that it was invoked for.
    c - The L<Config::Tiny> object containing the Toader config.
    toader - This is a L<Toader> object.
    self - This the L<Toader::Render::General> object.
    g - This the L<Toader::Render::General> object.

entryArchiveRow

This generates a row in the entry archive table.

The default template is as below.

      <tr id="entryArchive">
        <td id="entryArchive">[== $g->elink( "./", $date, $date ) ==]</td>
        <td id="entryArchive">[== $title ==]</td>
        <td id="entryArchive">[== $summary ==]</td>
      </tr>

The variables passed to it are as below.

    toDir - This is the relative back to the directory.
    toFiles - This is the relative path to the '.files' directory.
    obj - This is the object that it was invoked for.
    c - The L<Config::Tiny> object containing the Toader config.
    toader - This is a L<Toader> object.
    self - This the L<Toader::Render::General> object.
    g - This the L<Toader::Render::General> object.
    date - This is the entry name/date stamp.
    title - This is the title of the entyr.
    summary - This is a summary of the entry.

entryArchiveJoin

This joins the entry rows.

The default template is blank.

The variables passed to it are as below.

    toDir - This is the relative back to the directory.
    toFiles - This is the relative path to the '.files' directory.
    obj - This is the object that it was invoked for.
    c - The L<Config::Tiny> object containing the L<Toader> config.
    toader - This is a L<Toader> object.
    self - This the L<Toader::Render::General> object.
    g - This the L<Toader::Render::General> object.

entryArchiveEnd

This ends the authors link section.

The default template is as below.

    </table>

The variables passed to it are as below.

    toDir - This is the relative back to the directory.
    toFiles - This is the relative path to the '.files' directory.
    obj - This is the object that it was invoked for.
    c - The L<Config::Tiny> object containing the Toader config.
    toader - This is a Toader object.
    self - This the L<Toader::Render::General> object.
    g - This the L<Toader::Render::General> object.
Link to the entries directory.

One argument is taken and that is the text to use. If not specifieid, it defaults to "Index".

        $g->entriesIndexLink;

The template is 'entriesArchiveLink' and the default is as below.

    <a href="[== $url ==]">[== $text ==]</a>

The variables used are as below.

    url - This is the relative URL for this.
    text - This to use for with the link.
    toDir - This is the relative back to the directory.
    toFiles - This is the relative path to the '.files' directory.
    obj - The L<Toader::Entry> object.
    c - The L<Config::Tiny> object containing the Toader config.
    self - The L<Toader::Render::Entry> object.
    toader - This is a L<Toader> object.
    g - This is a L<Toader::Render::General> object.
Link to the entries directory.

One argument is taken and that is the text to use. If not specifieid, it defaults to "Latest".

        $g->entriesLink;

The template 'entriesLink' is used and the default is as below.

    <a href="[== $url ==]">[== $text ==]</a>

The variables are as below.

    url - This is the relative URL for this.
    text - This to use for with the link.
    toDir - This is the relative back to the directory.
    toFiles - This is the relative path to the '.files' directory.
    obj - The L<Toader::Entry> object.
    c - The L<Config::Tiny> object containing the Toader config.
    self - The L<Toader::Render::Entry> object.
    toader - This is a L<Toader> object.
    g - This is a L<Toader::Render::General> object.

This generates a link to a included file for the object.

Two arguements are taken. The first and required is the file. The second and optional is the text to use, which if not specified is the name of the file.

    $g->flink( $file );

The template 'linkFile' is used and the default is as below.

    <a href="[== $url ==]">[== $text ==]</a>

The variables passed are as below.

    url - This is the relative URL for this.
    text - This to use for with the link.
    toDir - This is the relative back to the directory.
    toFiles - This is the relative path to the '.files' directory.
    obj - The L<Toader::Entry> object.
    c - The L<Config::Tiny> object containing the Toader config.
    self - The L<Toader::Render::Entry> object.
    toader - This is a L<Toader> object.
    g - This is a L<Toader::Render::General> object.

This returns the URL for a gallery directory.

Three arguments are accepted. The first is the Toader directory to for the gallery, if not specified it uses the Toader directory for the current object. The second is the relative gallery directory, which if not specified defaults to the '', the root gallery directory.

    [== $g->galleryDirURL ==]

This generates the HTML for a large gallery image.

Two arguments are taken. The first and optional one is the directory, which if not specified, it uses the Toader current directory. The second and required is the gallery directory for the image, which if not specified it defaults to the root directory, ''. The third and required is the gallery image.

    [== $g->galleryImageLarge( undef, '', $someImage (.

This uses imageDiv with the content provided by imageExifTables.

This generates the HTML for a small gallery image.

Two arguments are taken. The first and optional one is the directory, which if not specified, it uses the Toader current directory. The second and required is the gallery directory for the image. The third and required is the gallery image.

This invokes imageDiv, using the name of the image as the content.

    [== $g->gallerImageSmall( undef, $gdir, $image ); ==]

This uses imageDiv with the link URL being the link to the image details and the lower text being the image file name.

This returns the large URL for a directory image.

Three arguments are accepted. The first is the Toader directory to for the gallery, if not specified it uses the Toader directory for the current object. The second is the relative gallery directory, which if not specified defaults to the '', the root gallery directory. The third is the image in that directory.

    [== $g->galleryLargeURL; ==]

This returns the URL for the large gallery image.

Three arguments are accepted. The first is the Toader directory to for the gallery, if not specified it uses the Toader directory for the current object. The second is the relative gallery directory, which if not specified defaults to the '', the root gallery directory. The third is the image in that directory.

    [== $g->galleryLargeImageURL( undef, $gdir, $image ); ==]

Two arguments taken for this. The first argument is required and it is the relative gallery directory, which if not specified defaults to the '', the root gallery directory. The second and optional is a image name, if any.

    [== $g->galleryLocationbar; ==]

This is largely useful for setting a locationSub for a gallery item. See Toader::Render::Gallery for a example of that.

Templates

galleryLocationStart

This starts the location bar insert.

The default template is as below.

    <h3>Gallery Location:

The variables below are passed to it.

    c - The L<Config::Tiny> object containing the Toader config.
    self - The L<Toader::Render::General> object.
    toader - This is a L<Toader> object.
    g - This is a L<Toader::Render::General> object.
    obj - This is the object that Toader was initiated with.

galleryLocationPart

This is a one of the gallery directories in the path to the one specified.

    <a href="[== $url ==]">[== $text ==]</a>

The variables below are passed to it.

    c - The L<Config::Tiny> object containing the Toader config.
    self - The L<Toader::Render::General> object.
    toader - This is a L<Toader> object.
    g - This is a L<Toader::Render::General> object.
    obj - This is the object that Toader was initiated with.
    gdir - The gallery directory this part is for.
    url - The URL for that gallery directory.
    text - The text(directory name) for that directory.

galleryLocationJoin

This joins the gallery parts together.

     /

The variables below are passed to it.

    c - The L<Config::Tiny> object containing the Toader config.
    self - The L<Toader::Render::General> object.
    toader - This is a L<Toader> object.
    g - This is a L<Toader::Render::General> object.
    obj - This is the object that Toader was initiated with.

galleryLocationEnd

This ends the gallery location bar.

The default template is as below.

    </h3>

The variables below are passed to it.

    c - The L<Config::Tiny> object containing the Toader config.
    self - The L<Toader::Render::General> object.
    toader - This is a L<Toader> object.
    g - This is a L<Toader::Render::General> object.
    obj - This is the object that Toader was initiated with.

galleryLocationImage

This is appended if something is specified for a image.

The default

    <h3>Image: <a href="[== $url ==]">[== $image ==]</a></h3>

The variables below are passed to it.

    c - The L<Config::Tiny> object containing the Toader config.
    self - The L<Toader::Render::General> object.
    toader - This is a L<Toader> object.
    g - This is a L<Toader::Render::General> object.
    obj - This is the object that Toader was initiated with.
    gdir - The gallery directory this part is for.
    url - The URL for that large(details) image page.
    text - The text(directory name) for that directory.

This returns the URL for the small gallery image.

Three arguments are accepted. The first is the Toader directory to for the gallery, if not specified it uses the Toader directory for the current object. The second is the relative gallery directory, which if not specified defaults to the '', the root gallery directory. The third is the image in that directory.

    [== $g->gallerySmallImageURL; ==]
This links to a Toader::Gallery gallery.

There are three optional arguments taken. The first is Toader directory this is for, if it is not specified, it assumes it is the current one. The second is the second one is the directory under it that it should link to, which defaults to the root of it if none is specified. The third is text of the link, which defaults to 'Gallery' if not specified.

    [== $g->galleryLink( undef, $gdir, $text ); ==]

The template used is 'linkGallery'. It is as below.

    <a href="[== $url ==]">[== $text ==]</a>

The variables passed are as below.

    url - This is the relative URL for this.
    text - This to use for with the link.
    c - The L<Config::Tiny> object containing the Toader config.
    self - The L<Toader::Render::General> object.
    toader - This is a L<Toader> object.
    g - This is a L<Toader::Render::General> object.
    obj - This is the object that Toader was initiated with.

This returns the URL for the source gallery image.

Three arguments are accepted. The first is the Toader directory to for the gallery, if not specified it uses the Toader directory for the current object. The second is the relative gallery directory, which if not specified defaults to the '', the root gallery directory. The third is the image in that directory.

    [== $g->gallerySrcURL( undef, $gdir, $image ); ==]

This returns true if the current directory has any documentation.

    if ( $g->hasDocs ){
        print "This directory has documentation...";
    }

Check if a entries directory exists for the Toader directory for the current object.

A boolean value is returned.

    my $hasEntries=$g->hasEntries;

This returns true if the current Toader directory has a gallery.

This is checked for by seeing if the gallery config exists.

This returns true if there are either Toader sub directories or it is not at root.

    if ( $g->hasAnyDirs ){
        print "Either not at root or there are Toader sub directires...";
    }

This renders a hash to a table.

Four arguments are taken. The first and required a hash reference to operate on. The second and optional is the title to use for the key column. The third and optional is the title to use for the value column. The fourth and optional is the CSS ID to use, which defaults to to "hashToTable".

    my $table=$foo->hashToTable( \%hash );

Templates

hashToTableBegin

This begins the table.

The default is as below.

    <table id="[== $cssID ==]">

The passed variables are as below.

    toDir - This is the relative back to the directory.
    toFiles - This is the relative path to the '.files' directory.
    obj - This is the object that it was invoked for.
    c - The L<Config::Tiny> object containing the Toader config.
    toader - This is a L<Toader> object.
    self - This the L<Toader::Render::General> object.
    g - This the L<Toader::Render::General> object.
    cssID - The CSS ID to use.

hashToTableTitle

This is a row that acts as the title row at the top of the table.

It is only rendered if a title is defined for either key or value.

The default is as below.

      <tr id="[== $cssID ==]">
        <td id="[== $cssID ==]"><bold>[== $keyTitle ==]</td>
        <td id="[== $cssID ==]"><bold>[== $valueTitle ==]</bold></td>
      </tr>

The passed variables are as below.

    toDir - This is the relative back to the directory.
    toFiles - This is the relative path to the '.files' directory.
    obj - This is the object that it was invoked for.
    c - The L<Config::Tiny> object containing the Toader config.
    toader - This is a L<Toader> object.
    self - This the L<Toader::Render::General> object.
    g - This the L<Toader::Render::General> object.
    cssID - The CSS ID to use.
    keyTitle - The title to use for the key column.
    valueTitle - The title to use for th value column.

hashToTableRow

This represents a row containing a key/value pair.

The default is as below.

      <tr id="[== $cssID ==]">
        <td id="[== $cssID ==]"><bold>[== $key ==]</td>
        <td id="[== $cssID ==]"><bold>[== $value ==]</bold></td>
      </tr>

The passed variables are as below.

    toDir - This is the relative back to the directory.
    toFiles - This is the relative path to the '.files' directory.
    obj - This is the object that it was invoked for.
    c - The L<Config::Tiny> object containing the Toader config.
    toader - This is a L<Toader> object.
    self - This the L<Toader::Render::General> object.
    g - This the L<Toader::Render::General> object.
    cssID - The CSS ID to use.
    key - The key for the row.
    value - The value for the row.

hashToTableJoin

This joins together the rendered rows.

The default is as below.

The passed variables are as below.

    toDir - This is the relative back to the directory.
    toFiles - This is the relative path to the '.files' directory.
    obj - This is the object that it was invoked for.
    c - The L<Config::Tiny> object containing the Toader config.
    toader - This is a L<Toader> object.
    self - This the L<Toader::Render::General> object.
    g - This the L<Toader::Render::General> object.
    cssID - The CSS ID to use.

hashToTableEnd

This ends the table.

The default is as below.

    </table>

The passed variables are as below.

    toDir - This is the relative back to the directory.
    toFiles - This is the relative path to the '.files' directory.
    obj - This is the object that it was invoked for.
    c - The L<Config::Tiny> object containing the Toader config.
    toader - This is a L<Toader> object.
    self - This the L<Toader::Render::General> object.
    g - This the L<Toader::Render::General> object.
    cssID - The CSS ID to use.

This returns to true if the current object directory has any Toader sub directories.

    if ( $g->hasSubDirs ){
        print "This directory has sub directories.";
    }

This can be used for creating a captioned image.

The takes five arguments. The first and required is the URL for the image. Second and optional is link to use for if the image is clicked on, which if not defined, the image will not be setup as a link. The third and optional is a caption to show above the image, which if left undefined defaults to ''. The fourth and optional is a caption to show below the image, which if left undefined defaults to ''. The fifth is the CSS ID to use, which if not defined defaults to 'imageDiv'. The sixth and optional is the alt test to use, which if not specified defaults to the provided image URL..

    $g-imageDiv( $imageURL, $imageLink, , 'some caption below it');

The default template, 'imageDiv' is as below.

    <div id='$cssID'>
      [== $above ==]
      [== if ( defined( $link ) ){ return '    <a href="'.$link.'"'> }else{ return '' } ==]
      <img src="[== $image ==]" alt="[== $alt ==]"/>
      [== if ( defined( $link ) ){ return '    </a>' }else{ return '' } ==]<br>
      [== $below ==]
    </div>

The variables passed are as below.

    toDir - This is the relative back to the directory.
    toFiles - This is the relative path to the '.files' directory.
    c - The L<Config::Tiny> object containing the Toader config.
    self - The L<Toader::Render::General> object.
    toader - This is a L<Toader> object.
    g - This is a L<Toader::Render::General> object.
    obj - This is the object that Toader was initiated with.
    image - This is the source URL to usse.
    above - This is the caption above the image.
    below - This is the caption below the image.
    link - This is a optional link to link to if the image is clicked on.
    alt - This is the alt text for the image.

This returns the table of the tags for a image.

This puts together a tables of the common EXIF tag groups.

    [== $g->imageExifTables( $image ); ==]

this methode ignores the EXIF tables listed below.

    ExifTool
    System
    PrintIM
    File
    Printing
    Copy1

Templates

imageExifTables

This begins it.

The default template is as below.

    <b>Image: </b> [== $filename ==] <br/>
    [== $tables ==]

The variables passed are as below.

    c - The L<Config::Tiny> object containing the Toader config.
    self - The L<Toader::Render::General> object.
    toader - This is a L<Toader> object.
    g - This is a L<Toader::Render::General> object.
    obj - This is the object that Toader was initiated with.
    filename - This is the name of the image file.
    tables - This is the rendered tables from generated by the templates below.

imageExifTablesBegin

This begins the prefixes joining of the tables.

The default template is blank.

The variables passed are as below.

    c - The L<Config::Tiny> object containing the Toader config.
    self - The L<Toader::Render::General> object.
    toader - This is a L<Toader> object.
    g - This is a L<Toader::Render::General> object.
    obj - This is the object that Toader was initiated with.

imageExifTablesGroup

This is a EXIF tag group.

The default table is as below.

    <br />
    <b>EXIF Tag Group: [== $group ==]</b>
    [== $table ==]
    <br />

The variables passed are as below.

    c - The L<Config::Tiny> object containing the Toader config.
    self - The L<Toader::Render::General> object.
    toader - This is a L<Toader> object.
    g - This is a L<Toader::Render::General> object.
    obj - This is the object that Toader was initiated with.
    group - This is the EXIF tag group.
    table - This is the generated by hash2table.

imageExifTablesJoin

This joins the text rendered for imageExifTablesGroup

The default template is blank.

The variables passed are as below.

    c - The L<Config::Tiny> object containing the Toader config.
    self - The L<Toader::Render::General> object.
    toader - This is a L<Toader> object.
    g - This is a L<Toader::Render::General> object.
    obj - This is the object that Toader was initiated with.

imageExifTablesEnd

This ends the prefixes joining of the tables.

The default template is blank.

The variables passed are as below.

    c - The L<Config::Tiny> object containing the Toader config.
    self - The L<Toader::Render::General> object.
    toader - This is a L<Toader> object.
    g - This is a L<Toader::Render::General> object.
    obj - This is the object that Toader was initiated with.

This returns the last entries, post rendering each one and joining them.

There is one optional and that is number of last entries to show. If not specified, it shows the last 15.

    $g->lastEntries;

Templates

entryListBegin

This begins the list of the last entries.

The default template is blank.

The passed variables are as below.

    toDir - This is the relative back to the directory.
    toFiles - This is the relative path to the '.files' directory.
    obj - This is the object that it was invoked for.
    c - The L<Config::Tiny> object containing the Toader config.
    toader - This is a L<Toader> object.
    self - This the L<Toader::Render::General> object.
    g - This the L<Toader::Render::General> object.

entryListJoin

This joins the rendered entries.

The default template is as below.

    <br>

The passed variables are as below.

    toDir - This is the relative back to the directory.
    toFiles - This is the relative path to the '.files' directory.
    obj - This is the object that it was invoked for.
    c - The L<Config::Tiny> object containing the Toader config.
    toader - This is a L<Toader> object.
    self - This the L<Toader::Render::General> object.
    g - This the L<Toader::Render::General> object.

entryListEnd

This ends the list of rendered entries.

The default template is as below.

    <br>

The passed variables are as below.

    toDir - This is the relative back to the directory.
    toFiles - This is the relative path to the '.files' directory.
    obj - This is the object that it was invoked for.
    c - The L<Config::Tiny> object containing the Toader config.
    toader - This is a L<Toader> object.
    self - This the L<Toader::Render::General> object.
    g - This the L<Toader::Render::General> object.
This generates a HTML link.

Two arguments are taken. The first and required one is the link. The second is the text, which if not specified will will be the same the link.

    $g->link( "http://foo.bar/whatever/", "whatever at foo.bar" );

The template used is 'link' and by default it is as below.

    <a href="[== $url ==]">[== $text ==]</a>

The variables passed are as below.

    url - This is the relative URL for this.
    text - This to use for with the link.
    toDir - This is the relative back to the directory.
    toFiles - This is the relative path to the '.files' directory.
    obj - The L<Toader::Entry> object.
    c - The L<Config::Tiny> object containing the Toader config.
    self - The L<Toader::Render::Entry> object.
    toader - This is a L<Toader> object.
    g - This is a L<Toader::Render::General> object.

This builds the side bar list of directories.

No options are taken.

    $g->listDirs;

This does not currently play nicely with any thing that will set fullURL.

Templates

dirListBegin

This begins the dirlist.

The template used is 'dirListBegin' and by default is blank.

The variables passed are as below.

    toDir - This is the relative back to the directory.
    toFiles - This is the relative path to the '.files' directory.
    obj - The L<Toader::Entry> object.
    c - The L<Config::Tiny> object containing the Toader config.
    self - The L<Toader::Render::Entry> object.
    toader - This is a L<Toader> object.
    g - This is a L<Toader::Render::General> object.

dirListJoin

This joins items in the directory list.

The default template is 'dirListJoin' and it is as below.

    <br>

The passed variables are as below.

    toDir - This is the relative back to the directory.
    toFiles - This is the relative path to the '.files' directory.
    obj - The L<Toader::Entry> object.
    c - The L<Config::Tiny> object containing the Toader config.
    self - The L<Toader::Render::Entry> object.
    toader - This is a L<Toader> object.
    g - This is a L<Toader::Render::General> object.

dirListLink

This is a link for a directory in the directory list.

The template is 'dirListLink' and it is by default as below.

    <a href="[== $url ==]">[== $text ==]</a>

The passed variables are as below.

    toDir - This is the relative back to the directory.
    toFiles - This is the relative path to the '.files' directory.
    obj - The L<Toader::Entry>> object.
    c - The L<Config::Tiny> object containing the Toader config.
    self - The L<Toader::Render::Entry> object.
    toader - This is a L<Toader> object.
    g - This is a L<Toader::Render::General> object.

dirListEnd

This ends the directory list.

The template used is 'dirListEnd' and the default is as below.

    <br>

The passed variables are as below.

    toDir - This is the relative back to the directory.
    toFiles - This is the relative path to the '.files' directory.
    obj - The L<Toader::Entry> object.
    c - The L<Config::Tiny> object containing the Toader config.
    self - The L<Toader::Render::Entry> object.
    toader - This is a L<Toader> object.
    g - This is a L<Toader::Render::General> object.

This returns returns a list of pages.

No options are taken.

    $g->listPages;

Templates

pageListBegin

This begins the page list.

The template is 'pageListBegin' and is blank.

The variables passed are as below.

    toDir - This is the relative back to the directory.
    toFiles - This is the relative path to the '.files' directory.
    obj - The L<Toader::Entry> object.
    c - The L<Config::Tiny> object containing the Toader config.
    self - The L<Toader::Render::Entry> object.
    toader - This is a L<Toader> object.
    g - This is a L<Toader::Render::General> object.

pageListJoin

This joins the items in the page list.

The template is 'pageListJoin' and is blank.

    <br>

The variables passed are as below.

    toDir - This is the relative back to the directory.
    toFiles - This is the relative path to the '.files' directory.
    obj - The L<Toader::Entry> object.
    c - The L<Config::Tiny> object containing the Toader config.
    self - The L<Toader::Render::Entry> object.
    toader - This is a L<Toader> object.
    g - This is a L<Toader::Render::General> object.

pageListLink

This is a link to a page

The template is 'pageListLink' and is blank.

    <a href="[== $url ==]">[== $text ==]</a>

The variables passed are as below.

    toDir - This is the relative back to the directory.
    toFiles - This is the relative path to the '.files' directory.
    obj - The L<Toader::Entry> object.
    c - The L<Config::Tiny> object containing the Toader config.
    self - The L<Toader::Render::Entry> object.
    toader - This is a L<Toader> object.
    g - This is a L<Toader::Render::General> object.

pageListEnd

This joins the items in the page list.

The template is 'pageListJoin' and is blank.

    <br>

The variables passed are as below.

    toDir - This is the relative back to the directory.
    toFiles - This is the relative path to the '.files' directory.
    obj - The L<Toader::Entry> object.
    c - The L<Config::Tiny> object containing the Toader config.
    self - The L<Toader::Render::Entry> object.
    toader - This is a L<Toader> object.
    g - This is a L<Toader::Render::General> object.

This puts together the the location bar.

One argument is taken and that is what to use for the lcation ID.

    $g->locationbar( $locationID );

Templates

locationStart

This starts the location bar.

The template used is 'locationStart' and the default is as below.

    <h2>Location:

The variabled passed are as below.

    toDir - This is the relative back to the directory.
    toFiles - This is the relative path to the '.files' directory.
    obj - The L<Toader::Entry> object.
    c - The L<Config::Tiny> object containing the Toader config.
    self - The L<Toader::Render::Entry> object.
    toader - This is a L<Toader> object.
    g - This is a L<Toader::Render::General> object.

locationPart

This is a part of the path in the location bar.

The template used is 'locationPart' and the default is as below.

    <a href="[== $url ==]">[== $text ==]</a> /

The variables passed are as below.

    url - This is the relative URL for this.
    text - This to use for with the link.
    toDir - This is the relative back to the directory.
    toFiles - This is the relative path to the '.files' directory.
    obj - The L<Toader::Entry> object.
    c - The L<Config::Tiny> object containing the Toader config.
    self - The L<Toader::Render::Entry> object.
    toader - This is a L<Toader> object.
    g - This is a L<Toader::Render::General> object.

locationEnd

This is the end of the location bar.

The template used is 'locationEnd' and the default is as below.

    [== $locationID ==]</h2>

The variables passed are as below.

    url - This is the relative URL for this.
    text - This to use for with the link.
    toDir - This is the relative back to the directory.
    toFiles - This is the relative path to the '.files' directory.
    obj - The L<Toader::Entry> object.
    c - The L<Config::Tiny> object containing the Toader config.
    self - The L<Toader::Render::Entry> object.
    toader - This is a L<Toader> object.
    g - This is a L<Toader::Render::General> object.
    locationID - The string to use for the end location bar.

This returns what ever has been set for the location sub via Toader::Render::General->locationSubSet.

    [== $g->locationSub ==]

This sets the location sub.

One argument is taken and that is what to set it to.

If not defined, '' is used.

    [== $g->locationSubSet( $whatever ) ==]

This returns the current value to from the root directory to directory for the object that initialized this instance of Toader::Render::General.

    my $or2r=$g->or2r;

This creates a summary of the pages in the current directory.

No arguments are taken.

    $g->pageSummary;

Templates

pageSummaryBegin

The begins the summary of the pages.

The template used is 'pageSummaryBegin' and the default is as below.

    <table id="pageSummary">
      <tr> <td>Name</td> <td>Summary</td> </tr>

The variabled passed are as below.

    toDir - This is the relative back to the directory.
    toFiles - This is the relative path to the '.files' directory.
    obj - The Toader::Entry object.
    c - The Config::Tiny object containing the Toader config.
    self - The Toader::Render::Entry object.
    toader - This is a Toader object.
    g - This is a Toader::Render::General object.

pageSummaryJoin

This joins the rows.

The template used is 'pageSummaryJoin' and by default is blank.

The variabled passed are as below.

    toDir - This is the relative back to the directory.
    toFiles - This is the relative path to the '.files' directory.
    obj - The L<Toader::Entry> object.
    c - The L<Config::Tiny> object containing the Toader config.
    self - The L<Toader::Render::Entry> object.
    toader - This is a L<Toader> object.
    g - This is a L<Toader::Render::General> object.

pageSummarySummary

This is a row in the table of pages.

The template used is 'pageSummarySummary' and by default is as below.

      <tr id="pageSummary">
        <td id="pageSummary"><a href="./[== $name ==]/">[== $name ==]</a></td>
        <td id="pageSummary">[== $summary ==]</td>
      </tr>

The variabled passed are as below.

    toDir - This is the relative back to the directory.
    toFiles - This is the relative path to the '.files' directory.
    obj - The L<Toader::Entry> object.
    c - The L<Config::Tiny> object containing the Toader config.
    self - The L<Toader::Render::Entry> object.
    toader - This is a L<Toader> object.
    g - This is a L<Toader::Render::General> object.
    name - This is the name of the page.
    summary - This is a summary of the page.
This is a link to summary of the pages for directory of the object.

On argument is accepted and that is the text to use for the link. If not specified, it defaults to 'Pages'.

    $g->pageSummaryLink;

The template used is 'pageSummaryLink' and the default is as below.

    <a href="[== $url ==]">[== $text ==]</a>

The variables passed are as below.

    url - This is the relative URL for this.
    text - This to use for with the link.
    toDir - This is the relative back to the directory.
    toFiles - This is the relative path to the '.files' directory.
    obj - The L<Toader::Entry> object.
    c - The L<Config::Tiny> object containing the Toader config.
    self - The L<Toader::Render::Entry> object.
    toader - This is a L<Toader> object.
    g - This is a L<Toader::Render::General> object.
This generates a link to a different page object.

Two arguments are taken.

The first and required one is the Toader directory containing the Toader object.

The second is the page to link to.

The third is the text, which if not specified will will be the same the link.

    $g->plink( $dir, $page, "whatever at foo.bar" );

The template used is 'linkPage' and it is by default as below.

    <a href="[== $url ==]">[== $text ==]</a>

The variables passed are as below.

    url - This is the relative URL for this.
    text - This to use for with the link.
    toDir - This is the relative back to the directory.
    toFiles - This is the relative path to the '.files' directory.
    obj - The L<Toader::Entry> object.
    c - The L<Config::Tiny> object containing the Toader config.
    self - The L<Toader::Render::Entry> object.
    toader - This is a L<Toader> object.
    g - This is a L<Toader::Render::General> object.

This returns the current value to from the root directory to current directory.

    my $r2r=$g->r2r;
This generates a link to the root directory.

One option arguement is taken. It is the text part of the link. If not defined it defaults to the relative path to the root directory.

    $g->rlink("to root");

The template used is 'toRootLink' and is as below.

    <a href="[== $url ==]">[== $text ==]</a>

The variables are as below.

    url - This is the relative URL for this.
    text - This to use for with the link.
    toDir - This is the relative back to the directory.
    toFiles - This is the relative path to the '.files' directory.
    obj - The L<Toader::Entry> object.
    c - The L<Config::Tiny> object containing the Toader config.
    self - The L<Toader::Render::Entry> object.
    toader - This is a L<Toader> object.
    g - This is a L<Toader::Render::General> object.
This renders the sidebar for a page.

The template is 'sidebar' and the default is as below.

    [==
      if ( ! $g->hasEntries ){
        return "";
      }
      return "<h3>Entries</h3>\n".
        "               ".$g->entriesLink." <br>\n".
        "               ".$g->entriesArchiveLink." <br>\n";
    ==]
    [==
      my $pages=$g->listPages;
      if ( ( ! defined( $pages ) ) || ( $pages eq "" ) ){
        return "";
      }
      return "          <hr><h3>".$g->pageSummaryLink."</h3>\n".$pages."\n              <hr>\n";
    ==]
    [==
      if( $g->hasGallery ){
        return "<hr>\n<h3>".$g->galleryLink."</h3>";
      }else{
        return "";
      }
    ==]
    [==
      if( $g->hasAnyDirs ){
          return "<hr>\n<h3>Directories</h3>";
      }else{
        return "";
      }
    ==]
    [== 
      if ( $g->atRoot ){
        return "";
      }
      return $g->rlink("Go To The Root")."              <br>\n          ".
        $g->upOneDirLink."              <br>\n          <br>";
    ==]
    
    [== 
      if ( $g->hasSubDirs ){
        return $g->listDirs;
      }
      return "";
    ==]
    [==
      if ( $g->hasDocs ){
        return "<hr>".$g->adListLink;
      }
      return "";
    ==]

The variables are as below.

    toDir - This is the relative back to the directory.
    toFiles - This is the relative path to the '.files' directory.
    obj - The L<Toader::Entry> object.
    c - The L<Config::Tiny> object containing the Toader config.
    self - The L<Toader::Render::Entry> object.
    toader - This is a L<Toader> object.
    g - This is a L<Toader::Render::General> object.

This returns the value that was set for toDir.

    my $toDir=>$g->toDir;

This renders the top include.

    $g->top;

The template is 'top' and the default is as below.

    <h1>[== $c->{_}->{site} ==]</h1><br>

The variables are as below.

    toDir - This is the relative back to the directory.
    toFiles - This is the relative path to the '.files' directory.
    obj - The L<Toader::Entry> object.
    c - The L<Config::Tiny> object containing the Toader config.
    self - The L<Toader::Render::Entry> object.
    toader - This is a L<Toader> object.
    g - This is a L<Toader::Render::General> object.
This creates a link up to the next directory.

One argument is taken and that is text to show for the link. If not specified, it defaults to 'Up One Directory'.

    $g->upOneDirLink;

The template is 'upOneDirLink' and the default is as below.

    <a href="[== $url ==]">[== $text ==]</a>

The passed variables are as below.

    url - This is the relative URL for this.
    text - This to use for with the link.
    toDir - This is the relative back to the directory.
    toFiles - This is the relative path to the '.files' directory.
    obj - The L<Toader::Entry> object.
    c - The L<Config::Tiny> object containing the Toader config.
    self - The L<Toader::Render::Entry> object.
    toader - This is a L<Toader> object.
    g - This is a L<Toader::Render::General> object.

No Toader object defined.

The object specified for the Toader object is not really a Toader object.

The specified Toader object has a permanent error set.

No object specified for the renderable object.

The object specified for the renderable object was not defined.

The specified renderable object has a permanent error set.

The renderable object does not have a directory specified.

Nothing defined for the link.

Failed to fetch the template.

No Toader directory specified.

The specified directory is not a Toader directory.

No Toader::Entry ID defined.

The entry does not exist.

No Toader page is defined.

The page does not exist.

No file specified.

Failed to initialize the Toader::Templates object.

Failed to figure out the relative from root path.

Failed to figure out the relative back to root path.

Failed to initialize the Toader::pathHelper object.

Failed to get a list of Toader sub directories for the current directory.

Failed to set the directory for Toader::Page::Manage.

Failed to get a list of pages.

Toader::Entry::Manage could not have it's directory set.

Failed to read a entry.

Failed to initialize Toader::Render::Entry.

Failed to render a entry.

No authors line specified.

Failed to parse the authors line.

Toader::Entry::Manage could not have it's directory set.

Failed to list the pages for the directory.

Failed to read the page.

The file specified for the AutoDoc link starts with a "../".

No URL specified in in the Toader Config.

No URL specified for the image.

No image file specified.

The specified image does not exist.

Path cleanup failed.

Failed to initialize Toader::Gallery.

Undefined outputURL for Toader::Gallery.

No source path specified for Toader::Gallery.

No source URL specified for Toader::Gallery.

The relative gallery directory contains a period.

No source URL specified for Toader::Gallery.

Failed to initialize Toader::AutoDoc.

Zane C. Bowers-Hadley, "<vvelox at vvelox.net>"

Please report any bugs or feature requests to "bug-toader at rt.cpan.org", or through the web interface at <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Toader>. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

You can find documentation for this module with the perldoc command.

    perldoc Toader::Render::General

You can also look for information at:

  • RT: CPAN's request tracker

    <http://rt.cpan.org/NoAuth/Bugs.html?Dist=Toader>

  • AnnoCPAN: Annotated CPAN documentation

    <http://annocpan.org/dist/Toader>

  • CPAN Ratings

    <http://cpanratings.perl.org/d/Toader>

  • Search CPAN

    <http://search.cpan.org/dist/Toader/>

Copyright 2013. Zane C. Bowers-Hadley.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.

2016-01-07 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.