No problem. It's attached. My format is pretty terse, so I'm not sure
how helpful it is.
++t
On Mon, 16 Jul 2001, Stuart Johnston wrote:
> Tony Payne wrote:
>
> > This isn't the best written tutorial, nor is it 100% inclusive or 100%
> > correct. However, it worked well for me when introducing Template-Toolkit
> > as part of our site generation process.
>
>
> I'd say that's a pretty good introductory tutorial but it's not really
> what I need. I think my question was probably not very clear.
>
>
> So, for example, my script uses a template file called editprofile.html
> which is passed the variables, uid, first, last and email. The webpage
> it generates should then return to the script with the variable
> process=updateprofile plus the new values for the variables passed to
> it. And of course there is a whole list of these so I need a consise
> way of describing them.
>
> Does that make any sense? Tony, it looks like maybe you define this in
> data_api.html. Obviously I don't want you to give away any trade
> secrets or anything like that but maybe you could just share the format
> that you use.
>
>
> Thanks,
> Stuart Johnston
>
>
> _______________________________________________
> templates mailing list
> [EMAIL PROTECTED]
> http://www.template-toolkit.org/mailman/listinfo/templates
>
Tony Payne : Sr. Software Engineer : PETsMART.com : 626-817-7151
Title: Sitegen Data API
Sitegen Data API
| article |
| Field/Method | Name | Type |
| F | article_id | number |
| F | headline | string |
| F | headline_ut | string (uppercase, trimmed) |
| F | short_title | string |
| F | short_title_ut | string (uppercase, trimmed) |
| F | abstract | string |
| F | keywords | string |
| F | teaser | string |
| F | teaser_ut | string (uppercase, trimmed) |
| F | body | string |
| F | review_status | string |
| F | image_path | string |
| F | thumbnail_image_path | string |
| F | teaser_image_path | string |
| F | chg_ts | string (date) |
| F | crt_ts | string (date) |
| F | notes | string |
| F | copyright | string |
| F | author | string |
| F | author_ut | string (uppercase, trimmed) |
| F | source | string |
| F | source_ut | string (uppercase, trimmed) |
| F | template_id | number |
| F | template | template object |
| F | link_to_flg | string (T or F) |
| F | start_date | string (date) |
| F | end_date | string (date) |
| F | author_bio | string |
| F | photo_credits | string |
| F | object_type | string (always = 'ARTICLE') |
| F | layout | layout object |
| F | default_section | section object |
| F | associated_sections | list of section objects |
| F | assigned_sections | list of section objects |
| F | section_templates | associative list key: section id, value: template objects |
| F | url | string |
| M | get_layout(layout_group) | list of layout-element objects |
| M | get_row_layout(layout_group) | list of layout-element objects |
| M | get_template(section) | template object |
| M | section_url(section) | string |
| product |
| Field/Method | Name | Type |
| F | product_id | number |
| F | product_name | string |
| F | description | string |
| F | sequence_number | number |
| F | image_path | string |
| F | thumb_image_path | string |
| F | large_image_path | string |
| F | user_edit_flg | string (T or F) |
| F | ship_charge | number (price) |
| F | display_variant_product_id | number |
| F | variant_description | string |
| F | display_flg | string (T or F) |
| F | inventory_behavior | string |
| F | display_note | string |
| F | display_link_flg | string (T or F) |
| F | brand | string |
| F | vendor | string |
| F | phx_code | string |
| F | zoom_description | string |
| F | price | number (price) |
| F | master_product_id | number |
| F | crt_ts | string (date) |
| F | chg_ts | string (date) |
| F | search_keywords | string |
| F | tax | number (price) |
| F | t_product_name | string |
| F | rx_flg | string (T or F) |
| F | product_type | string (M or V -- or R) |
| F | variant_1 | string |
| F | variant_2 | string |
| F | variant_3 | string |
| F | weight_lbs | number |
| F | weight_fee_flg | string (T or F) |
| F | width_inches | number |
| F | height_inches | number |
| F | depth_inches | number |
| F | gift_wrap_flg | string (T or F) |
| F | personalize_flg | string (T or F) |
| F | multipack | string |
| F | upc_code | string |
| F | merch_cat_id | string |
| F | petm_sap_sku | string |
| F | mfg_style_num | string |
| F | catalog_code | string |
| F | template_id | number |
| F | missing_image_flg | string (T or F) |
| F | pf_sequence_number | number |
| F | drop_down_order | number |
| F | variant_category1 | string |
| F | variant_category2 | string |
| F | variant_category3 | string |
| F | dfs_chg_ts | string (date) |
| F | product_name_ut | string (uppercase, trimmes) |
| F | display_name | string (name and variant_* -- full name) |
| F | sf_display_flg | string (T or F) |
| F | options | string (variant_*) |
| F | inv_on_hand | number |
| F | inv_allocated | number |
| F | object_type | string (always = 'PRODUCT') |
| F | layout | layout object |
| F | template | template object |
| F | rx | boolean (1 = rx, 0 = not rx) |
| F | master_product | product object |
| F | default_section | section object |
| F | associated_sections | list of section objects |
| F | assigned_sections | list of section objects |
| F | section_templates | associative list keys: section_id, values: template objects |
| F | display | boolean |
| F | cross_sells | list of product objects |
| F | global_url | string |
| F | variants | variant object |
| F | pf_variants | variant object |
| F | prices_forward | prices-forward object |
| F | has_tiers | boolean |
| M | get_template(section) | template object |
| M | section_url(section) | string |
| M | get_layout(layout_group) | list of layout-element objects |
| M | get_row_layout(layout_group) | list of layout-element objects |
| section |
| Field/Method | Name | Type |
| F | section_id | number |
| F | parent_id | number |
| F | section_title | string |
| F | section_description | string |
| F | sequence_number | number |
| F | section_path | string |
| F | dir_path | string |
| F | icon_path | string |
| F | display_pawspectives_flg | string (T or F) |
| F | display_marketing_tile_flg | string (T or F) |
| F | background_image | string |
| F | cart_dir | string |
| F | right_well_color | string |
| F | need_product_flg | string (T or F) |
| F | need_article_flg | string (T or F) |
| F | need_subsection_flg | string (T or F) |
| F | keep_on_site_flg | string (T or F) |
| F | keep_on_site_note | string |
| F | show_navigation_flg | string (T or F) |
| F | template_id | number |
| F | start_date | string (date) |
| F | end_date | string (date) |
| F | link_to_flg | string (T or F) |
| F | crt_ts | string (date) |
| F | chg_ts | string (date) |
| F | dfs_chg_ts | string (date) |
| F | header_filename | string |
| F | footer_filename | string |
| F | object_type | string (always = 'SECTION') |
| F | template | template object |
| F | name | string (section_title, lowercased, with _ for all non-alphanumerics) |
| F | top_level_section_id | number |
| F | top_level_section | section object |
| F | category_section_id | number |
| F | category_section | section object |
| F | display_pawspectives | boolean |
| F | display_marketing_tile | boolean |
| F | associated_products | list of product objects |
| F | product_positions | associative list keys: product_id, values: indexes |
| F | associated_articles | list of article objects |
| F | article_positions | associateive list keys: article_id, values: indexes |
| F | layout | layout object |
| F | subsections | list of section objects |
| F | url | string |
| F | parent | section object |
| F | background | string |
| F | search_box_file | string |
| F | show_navigation | boolean |
| M | get_prev_and_next(product) | two product objects, both possibly null |
| M | index_of(product) | number. -1 if product is not assigned |
| M | prev_product(product) | product object (undefined if not exists or first product) |
| M | next_product(product) | product object (undefined if not exists or last product) |
| M | num_products | number (number of assigned products) |
| M | is_psearch | boolean (true if no subsections) |
| M | get_header | string |
| M | get_footer | string |
| M | product_link(product) | string |
| M | get_products(index, count) | list of product objects index default is 0, count default is 20 |
| M | get_articles(index, count) | list of article objects index default is 0, count default is 20 |
| M | get_layout(layout_group) | list of layout-element objects |
| M | get_row_layout(layout_group) | list of layout-element objects |
| M | get_recursive_layout(layout_group) | list of layout-element objects unfilled positions in the layout are inherited from higher up the section tree. |
| M | get_url(index, items_per_page) | string |
| template |
| Field/Method | Name | Type |
| F | template_id | number |
| F | template_filename | string |
| F | template_name | string |
| F | template_type | string |
| F | crt_ts | string (date) |
| F | chg_ts | string (date) |
| F | object_type | string (always = 'TEMPLATE') |
| M | error | string (null if no error) |
| M | process(vars, op) | (do not use directly) |
| layout |
| Field/Method | Name | Type |
| F | type | string (do not use directly) |
| F | id | number (do not use directly) |
| F | groups | list of layout-group objects (do not use directly) |
| M | get_group(group_name) | layout-group object |
| M | group_names | list of strings |
| layout-group |
| Field/Method | Name | Type |
| F | name | string |
| F | max_elements | number null = no limit or template-imposed limit |
| F | _elements | (do not use directly) |
| M | add_element | (do not use directly) |
| M | elements | list of layout-element objects list will not contain more than max_elements items |
| size | number (total number of elements, irrespective of max_elements) |
| layout-element |
| Field/Method | Name | Type |
| F | object_type | string (INCLUDE, ARTICLE, PRODUCT, etc.) |
| F | object_name | string (for INCLUDE or IMAGE: filepath) |
| F | object_article_id | number |
| F | object_section_id | number |
| F | object_product_id | number |
| F | article | article object (null unless object_type=ARTICLE) |
| F | section | section object (null unless ojbect_type=SECTION) |
| F | product | product object (null unless object_type=PRODUCT) |
| F | layout_ord | number |
| prices-forward |
| Field/Method | Name | Type |
| F | price | number (price) |
| F | master_product | product object |
| F | variant_description | string |
| F | cart_type | string ('addview' or 'view') |
| F | pf_product | product object (null unless type='addview') |
| variant-sequence |
| Field/Method | Name | Type |
| F | master_product | product object |
| F | products | list of product objects |
| F | index | number |
| F | tiers | tier-set object |
| M | num_prooducts | number |
| M | get_products(index) | product object |
| M | add_product(product) | (do not use directly) |
| M | has_tiers | boolean |
| M | product_name | string |
| M | price | number (price) |
| tier-price |
| Field/Method | Name | Type |
| F | qty | number |
| F | price | number (price) |
| F | prc_off | number (percentage) |
|