Sidebox and popup window structures

From Zen Cart(tm) Wiki
Jump to: navigation, search
Warning.png Required knowledge
Before proceeding you must understand the template system.

"<" and ">" are used to indicate that you should replace what's inside them with whatever appropriate.

Sideboxes File Structure

Filenames etc, if needed.
includes/languages/<current language>/extra_definitions/<sidebox_name>.php
Language definitions for sidebox content.
includes/languages/<current template>/<current language>.php
Only if the defines you want to change are part of <current language>.php.
includes/modules/sideboxes/<current template>/<sidebox_name>.php
Defines the content of the sidebox, via program flow commands.
includes/templates/<current template>/sideboxes/tpl_<sidebox_name>.php
Assembles the content from the module plus any extras needed.

Popup Window File Structure

includes/languages/<current language>/<current template>/popup_<windowname>.php
intelligence processing
javascript code for function resize(), used to resize a popup window (works best on IMG's, not text)
onload action for body tag IF the resize above is used
includes/templates/<current template>/popup_<windowname>/tpl_main_page.php
display driver to remove left/right/top/bottom boxes
includes/templates/<current template>/templates/tpl_popup_<windowname>_default.php
template - actual HTML
define the popup_<windowname> filename

The Following Pages Contain JavaScript Links

includes/modules/pages/<page name>/jscript_main.php
javascript code for function popupWindow() with height/width parameters for a popup window
includes/modules/pages/<page name>/main_template_vars_<xxxxxxxx>.php
(use for images) contains a href javascript::popup(url) command
includes/templates/<current template>/templates/tpl_<xxxxxxxx>_default.php
contains the javascript::popup(url) command in a href
Info.png Javascript resize
Note that if javascript function resize() is used on a page, it will override the parameters set as default in function popupWindow().