Notify me of new responses |
So, I just implemented a little bit of PS3, and I noticed that the help links to the content section help topics were not working. Upon inspection, I saw the following code in pvt/home.tcl:Notice that the help link (content-help.tcl) references the url variable section_key, which is nowhere to be found. It's not in the SELECT; section_key is just another column in the table. Easy fix, just add it to the select:
set selection [ns_db select $db "select section_url_stub, section_pretty_name, sort_key, intro_blurb, help_blurb from content_sections where enabled_p = 't' order by sort_key, upper(section_pretty_name)"] set last_sort_key "" while { [ns_db getrow $db $selection] } { set_variables_after_query if { ![empty_string_p $last_sort_key] && ($last_sort_key != $sort_key) } { append content_section_items "\n" } set last_sort_key $sort_key append content_section_items "<li><a href=\"$section_url_stub\">$section_pretty_name</a>\n" if ![empty_string_p $intro_blurb] { append content_section_items " - $intro_blurb" } if ![empty_string_p $help_blurb] { append content_section_items " <font size=-1><a href=\"content-help.tcl?[export_url_vars section_key] \">help</a></font>" } }
set selection [ns_db select $db "select section_key, section_url_stub, section_pretty_name, sort_key, intro_blurb, help_blurb from content_sections where enabled_p = 't' order by sort_key, upper(section_pretty_name)"]
-- Matthew Lee, October 21, 1999