[ic] 4.7.3 problems with template management and page component override

Matt Flaherty interchange-users@lists.akopia.com
Thu May 31 06:46:00 2001


Hi,

I've been hacking around with some of the UI code in the 4.7.3 distribution
because I found a bug in the files lib/UI/pages/admin/template_save.html and
lib/UI/pages/admin/template_preview.html, in which they did not properly
establish the path to the component files. I've created a patch file if
anyone is interested. Also in my investigations, I've noticed that the pages
in the Foundation demo feature some code to override the default components
set up in the templates, such as in index.html:

----------------^snip----------------
[comment]
ui_template: Yes
ui_template_name: leftright
[/comment]

[set page_title]__COMPANY__ -- Welcome[/set]
[set page_banner]Welcome[/set]
[set bgcolor]#FFFFFF[/set]

[control reset=1]

[control-set]
[component]search_box_small[/component]
[/control-set]

[control-set]
[component]cart_tiny[/component]
[/control-set]

[control-set]
[component]category_vertical[/component]
[/control-set]
[control-set]
[component][/component]
[/control-set]

[control-set]
[component]cross_horizontal[/component]
[size]2[/size]
[cols]2[/cols]
[banner]Specials[/banner]
[/control-set]

[control-set]
[component]random[/component]
[size]3[/size]
[cols]1[/cols]
[banner]See also...[/banner]
[/control-set]

[control reset=1]
----------------^snip----------------

After saving the content of the page in the Page Editor, this gets replaced
with (adlink_banner_bottom and adlink_banner_top are two components that I
created):

----------------^snip----------------
[comment]
ui_template: Yes
ui_template_name: leftright
[/comment]

[set adlink_banner_bottom][/set]
[set adlink_banner_top][/set]
[set NONE]^@^@^@[/set]
[set search_box_small][/set]
[set category_vertical][/set]
----------------^snip----------------

The scratch variables page_title, page_banner and bgcolor have also been
cleared. I don't understand the purpose of this new code. It seems to clear
these variables rather than to properly set up the components on the page.
Should I be hacking lib/UI/pages/admin/page_save.html to produce the former?
Is this something that is currently being worked on?

-Matt