[!] confiure the site plan if not allready done [/!] [include file=admin/ConfigurePlan.tpl&fromroot=T] [!] some default settings [/!] [text]PAGE_WIDTH=100%[/text] [text]PAGE_HEIGHT=800[/text] [text]iframe_height=[math][page_height]*.75[/math][/text] [text multi=t][search db=admin/prefs.db&nePREFdata=0][founditems][pref]=[url][value][/url]&[/founditems][/search][/text] [SETMIMEHEADER name=Pragma&value=no-cache] [SETMIMEHEADER name=Expires&value=Thu, 01 Dec 1994 16:00:00 GMT] [SETMIMEHEADER name=Cache-Control&value=max-age=0] [middle startafter=>&endbefore=</][NAME][/middle] [!]Need to include the stylesheet this way to use webdna variables[/!] [!][text]body_include=additionalpages/generic.inc[/text][/!] [text]body_include=generic.inc[/text] [!]if not pageid is passed in then default to home page[/!] [showif [raw][pageid][/raw]=[pageid]] [text]hasStore=[lookup db=admin/pages.db&lookinField=recordid&value=1&returnField=AllowModify¬Found=N][/text] [!][if "[hasStore]"="N"][then] [text]defaultPageid=18[/text] [/then] [else] [text]defaultPageid=1[/text] [/else] [/if][/!] [!]make the first page on the main tabs the default page[/!] [search db=admin/pages.db&group1field=SecurityGroups&group1fields=SecurityGroups&eqgroup1data=[blank]&woSecurityGroupsdata=[mygroups]&SecurityGroupswbrk=+&SecurityGroupsword=ww&deRANKsort=1&RANKtype=num&PageNamesort=2&Ranktype=num] [founditems] [showif [menulocation]=MainTabs][text]defaultPageid=[recordid][/text][/showif] [/founditems] [/search] [text]pageid=[defaultPageid][/text] [/showif] [!]============================================= Send special WAP information for cell phones ================================================[/!] [ShowIf [URL][GetMIMEHeader HTTP_ACCEPT][/URL]^hdml] [include file=wap/default.inc] [/ShowIf] [!]============================== Handle "Add to Shopping Cart" =================================[/!] [showif [action]=Add] [!] [formvariables][name]:[value]
[/formvariables][/!] [!] Add the main sku to the cart [/!] [addlineitem cart=[cart]&db=admin/products.db&sku=[url][sku][/url]]quantity=[qty]&[formvariables name=__&exact=F]Text[lookup db=admin/categories.db&lookinfield=C_ID&value=[getchars start=3][name][/getchars]&returnfield=C_CART]=[url][value][/url]&[/formvariables][/addlineitem] [text]addedLineItem=[sku][/text] [!] Add all the related skus to the cart as well [/!] [formvariables name=---&exact=F] [addlineitem cart=[cart]&db=admin/products.db&sku=[url][value][/url]][formvariables name=^[value]|&exact=F]Text[lookup db=admin/categories.db&lookinfield=C_ID&value=[middle startafter=|&endbefore=][name][/middle]&returnfield=C_CART]=[url][value][/url]&[/formvariables][/addlineitem] [/formvariables] [/showif] [table name=t1&fields=from,to] %0B [/table] [convertchars table=t1] [showif [PAGE_ALIGN]=Centered]
[/showif] [!]get the content pages for each section[/!] [search db=admin/pages.db&eqRecordIDdatarq=[PageID]&asRANKsort=1&RANKtype=num] [founditems] [!]If they selected left for the main tab location make it the side menu for all pages[/!] [if "[MAIN_TAB_LOCATION]"="Left"][then] [text]_LeftTemplate=menu_main_tabs.inc[/text] [/then] [else] [if "[UPPER_RIGHT_LINKS_LOCATION]"="Left"][then] [text]_LeftTemplate=menu_upper_right_links.inc[/text] [/then] [else] [text]_LeftTemplate=[LeftTemplate][/text] [/else] [/if] [/else] [/if] [text]_MiddleTemplate=[MiddleTemplate][/text] [if "[MAIN_TAB_LOCATION]"="Right"][then] [text]_RightTemplate=menu_main_tabs.inc[/text] [/then] [else] [if "[UPPER_RIGHT_LINKS_LOCATION]"="Right"][then] [text]_RightTemplate=menu_upper_right_links.inc[/text] [/then] [else] [text]_RightTemplate=[RightTemplate][/text] [/else] [/if] [/else] [/if] [text]_UseIframe=[UseIframe][/text] [text]_LeftExternalLink=[LeftExternalLink][/text] [text]_MiddleExternalLink=[MiddleExternalLink][/text] [text]_RightExternalLink=[RightExternalLink][/text] [/founditems] [/search] [showif [TOP_MARGIN_HEIGHT]!] [hideif [TOP_MARGIN_HEIGHT]=0]
[/hideif] [/showif] [!]
[/!] [include file=title.inc]
[showif [_LeftTemplate]!] [/showif] [showif [_MiddleTemplate]!] [!]trying to calculate the width of the middle col because top menu being in the same table with colspan=3 messed it up so i changed the top include title to be in a separate table[/!] [!][if ("[PAGE_WIDTH]"^"%")][then] [if ("[LEFT_PANEL_WIDTH]"^"%")][then] [text]middleWidth=[PAGE_WIDTH][/text] [/then] [else] [text]middleWidth=*[/text] [/else] [/if] [/then] [else] [math show=F]middleWidth=[PAGE_WIDTH][showif [_LeftTemplate]!]-[LEFT_PANEL_WIDTH][/showif][showif [_RightTemplate]!]-[LEFT_PANEL_WIDTH][/showif] [/math] [/else] [/if][/!] [text]middleWidth=*[/text] [/showif] [showif [_RightTemplate]!] [/showif] [!]bottom panel/footer [/!] [showif [_LeftTemplate]!] [/showif] [showif [_RightTemplate]!] [/showif]
[ShowIf ![LEFT_PANEL_TOP_GRAPHIC]] [/ShowIf] [if ("[_LeftExternalLink]"!"")&("[_LeftTemplate]"="ExternalLink")][then] [/then] [!]otherwise, use content they selected from additional pages[/!] [else] [include file=additionalpages/[_LeftTemplate]] [/else] [/if] [text]REL_ROOT_DIR=[/text] [if "[_MiddleTemplate]"="../subnav.tpl"][then] [!]the pages.db pageid = sec_id in sitemap.db from the intranet [/!] [search db=[REL_ROOT_DIR]admin/sitemap.db&eqSM1_IDdatarq=[pageID]] [founditems] [text multi=t][ListFields db=[REL_ROOT_DIR]admin/sitemap.db][fieldname]=[Interpret][[fieldname]][/Interpret]&[/ListFields][/text] [/founditems] [/search] [/then] [/if] [if ("[_UseIframe]"="Y")|("[_MiddleTemplate]"="ExternalLink")][then] [text multi=t][search db=[REL_ROOT_DIR]admin/prefs.db&nePREFdata=0][founditems][pref]=[value]&[/founditems][/search][/text] [!]pass all the parameters to the subnav.tpl for the intranet pages[/!] [!] [/then] [!]otherwise, use content they selected from additional pages[/!] [else] [/else] [/if] [/then] [else] [include file=additionalpages/[_MiddleTemplate]] [/else] [/if] [ShowIf ![RIGHT_PANEL_TOP_GRAPHIC]] [hideIf [RIGHT_PANEL_TOP_GRAPHIC]=[raw][RIGHT_PANEL_TOP_GRAPHIC][/raw]]
[/hideif] [/ShowIf] [if ("[_RightExternalLink]"!"")&("[_RightTemplate]"="ExternalLink")][then] [/then] [!]otherwise, use content they selected from additional pages[/!] [else] [include file=additionalpages/[_RightTemplate]] [/else] [/if]
[ShowIf ![LEFT_PANEL_BOTTOM_GRAPHIC]] [/ShowIf] [FOOTER_TEXT]
[showif [PAGE_ALIGN]=Centered]
[/showif] [/convertchars]