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

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

Popup Window File Structure

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

The Following Pages Contain JavaScript Links

includes/modules/pages/<page name>/jscript_main.php</dt>
javascript code for function popupWindow() with height/width parameters for a popup window</dd>
includes/modules/pages/<page name>/main_template_vars_<xxxxxxxx>.php</dt>
(use for images) contains a href javascript::popup(url) command</dd>
includes/templates/<current template>/templates/tpl_<xxxxxxxx>_default.php</dt>
contains the javascript::popup(url) command in a href</dd>

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().
Personal tools