I finally figured out how to print debug info!  (It's been about a month!)
"text" | stderr(binmode=1);

Now that I have the debug info, maybe you can help me.
Inside find_menu_link, when it finds a match, sometimes the item looks like:
$VAR1 = {
          'here' => '',
          'subs' => '',
          'url' => '/valid_url.html',
          'file' => 'Valid_File.html',
          'name' => 'A1_a',
          'path' => 'A1/a1_a',
          'id' => 'A1_a',
          'hot' => ''
        };

Sometimes the item looks like:
$VAR1 = {
          'name' => 'B1_a'
        };
and then an empty url is returned to link_to_page.

Do you understand why these are different? I'm using "mapx" instead of "map", but mapx still does
PROCESS config/expand;

Thanks for your help,
Steve

Bill Moseley said the following on 05/25/2005 12:35 PM:
On Tue, May 24, 2005 at 09:04:54PM -0700, Steve Kelem wrote:
  
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Thanks.&nbsp; It mostly works.&nbsp; I ran into a problem.&nbsp; If my map looks like:<br>
<br>
<pre>A
  A1
    A1_a
    A1_b
  A2
    A2_a
    A2_b
B
  B1
    B1_a
  B2
    B2_a

</pre>
If I'm processing a link_to_page to A2 from A.A2.A2_a, it works okay.<br>
If I try to link to A1_a, link_to_page complains: "menu error - Failed
to find menu link.<br>
This is because I followed the badger book example for sitemap.xml on
page 426, where the id of the first (sub)menu &amp; (sub)page has an
id="index".&nbsp; So the ids are not unique, but the names are.<br>
I changed the line:<br>
    

I don't have much time and it's not fun reading HTML ;), but you can
look at an example of the site map and the "expand" template code to
populate the map.

   http://cvs.sourceforge.net/viewcvs.py/swishe/swish_website/

so specifically:

  map:

  http://cvs.sourceforge.net/viewcvs.py/swishe/swish_website/lib/config/map?rev=1.9&view=auto

  the "expand" template
  http://cvs.sourceforge.net/viewcvs.py/swishe/swish_website/lib/config/expand?rev=1.4&view=auto

  the macro:
  http://cvs.sourceforge.net/viewcvs.py/swishe/swish_website/lib/config/macros?rev=1.1.1.1&view=auto

  and the template code to do various things with the map:
  http://cvs.sourceforge.net/viewcvs.py/swishe/swish_website/lib/menu/



  

_______________________________________________ templates mailing list [email protected] http://lists.template-toolkit.org/mailman/listinfo/templates

Reply via email to