Source

shlomi-fish-homepage / lib / local-defs.wml

Full commit
<set-var latemp_navmenu_object_class="HTML::Widgets::NavMenu::JQueryTreeView" />
<set-var latemp_with_favicon="<latemp_mynot "$(PRINTABLE)" />" />
<set-var latemp_with_xml_declaration="1" />
<set-var latemp_with_breadcrumbs_trail="1" />
<set-var latemp_html_standard="xhtml1.1" />
<set-var latemp_nav_links_allowed_places="top-left" />
<set-var latemp_gen_plain_page="$(PRINTABLE)" />
<set-var latemp_with_head_meta_tags="<latemp_mynot "$(PRINTABLE)" />" />
<set-var latemp_with_html_head_nav_links="<latemp_mynot "$(PRINTABLE)" />" />
<set-var latemp_with_html_head_stylesheets="<latemp_mynot "$(PRINTABLE)" />" />
<:{
    use Shlomif::WrapAsUtf8 (qw(_wrap_as_utf8));
}:>
<define-tag latemp_get_breadcrumbs_trail_unconditionally>
<:{
    use strict;
    use warnings;

    use NavDataRender;

    init_section_nav_menu();

    use vars qw($section_nav_menu);

    NavDataRender->render_breadcrumbs_trail_unconditionally(
        {
            total_leading_path =>
            $section_nav_menu->total_leading_path(
                {
                    main_leading_path => $leading_path,
                }
            ),
        }
    );
}:>
</define-tag>

<define-tag latemp_get_nav_menu_html>
<:{

{
    _wrap_as_utf8( sub {
        print join("\n", @$nav_html);
    });
}

}:>
</define-tag>


<define-tag latemp_get_html_head_nav_links>
<:{
    use strict;
    use warnings;

    NavDataRender->render_html_head_nav_links(
        { nav_links_obj => $nav_links_obj}
    );
}:>
</define-tag>


<define-tag latemp_get_html_body_nav_links_helper>
<preserve with_accesskey />
<set-var %attributes />
<:{
    my $with_accesskey = "<get-var with_accesskey />";
    my @params;
    if ($with_accesskey ne "")
    {
        push @params, ('with_accesskey' => $with_accesskey);
    }
    _wrap_as_utf8(sub {
        print $nav_links_renderer->get_total_html(@params);
    });
}:>
<restore with_accesskey />
</define-tag>
<define-tag latemp_get_html_body_nav_links_helper>
<preserve with_accesskey />
<set-var %attributes />
<preserve object_class filename host />
<set-var object_class="<latemp_default_val "<get-var latemp_navmenu_object_class />" "HTML::Widgets::NavMenu" />" />
<set-var filename="<latemp_default_val "<get-var latemp_filename />" "$(LATEMP_FILENAME)" />" />
<set-var host="<latemp_default_val "<get-var latemp_server />" "$(LATEMP_SERVER)" />" />

<:{
use strict;
use warnings;

use Data::Dumper;

use NavDataRender;


my $results = NavDataRender->nav_data_render(
    {
        filename => "<get-var filename />",
        host => "<get-var host />",
        ROOT => "$(ROOT)",
    }
);

# warn Dumper({Results => $results,});

use vars qw($shlomif_main_expanded_nav_bar);
$shlomif_main_expanded_nav_bar = $results->{shlomif_main_expanded_nav_bar};

use vars qw($shlomif_nav_links_renderer);

$shlomif_nav_links_renderer = $results->{nav_links_renderer};

}:>
<:{
    use strict;
    use warnings;

    my $with_accesskey = "<get-var with_accesskey />";
    my @params;
    if ($with_accesskey ne "")
    {
        push @params, ('with_accesskey' => $with_accesskey);
    }
    print $shlomif_nav_links_renderer->get_total_html(@params);
}:>
<restore object_class filename host />
<restore with_accesskey />
</define-tag>