# Copyright (c) 2001-2005 bivio Software, Inc. All rights reserved. # # Visit http://www.bivio.biz for more info. # # This library is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as # published by the Free Software Foundation; either version 2.1 of the # License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; If not, you may get a copy from: # http://www.opensource.org/licenses/lgpl-license.html # # $Id: menu.bview,v 2.1 2005/08/10 15:32:53 nagler Exp $ # # Product menu items parent page. # # Parameters: view_put(menu_heading => ''); view_declare('menu_content'); view_parent('header'); # construct a list of menu links for products my($menu_cells) = [map { my($category) = Bivio::PetShop::Type::Category->$_(); ( Link(String($category->get_short_desc), vs_product_uri($category)), Join([' | ']), ); } @{view_get('header_categories')}]; # remove the extra 'Join([' |' pop(@$menu_cells); view_put(header_content => Join([ Grid([ [Join($menu_cells)->put(cell_align => 'center')], [String(view_widget_value('menu_heading'))], ], { string_font => 'page_heading', expand => 1, pad => 4, }), view_widget_value('menu_content'), ]));