Custom Template Reference

From Sohowiki
(Difference between revisions)
Jump to: navigation, search
(Hard-coded page links)
(Download .zip how-to package with PDF tutorial)
Line 4: Line 4:
 
Want to learn how to create your own templates for Pro Edition? [https://addons.soholaunch.com/media/Creating_Custom_Template_for_SOHO.zip Download this great how-to article] (with example files!) written by Soholaunch customer Jaun-Vincent Haasbroek.
 
Want to learn how to create your own templates for Pro Edition? [https://addons.soholaunch.com/media/Creating_Custom_Template_for_SOHO.zip Download this great how-to article] (with example files!) written by Soholaunch customer Jaun-Vincent Haasbroek.
 
[[Image:1000words-templates.gif|frame|The picture that's worth 1000 words when it comes to creating custom templates for Soholaunch Pro Edition. Taken from Soholaunch customer Jaun-Vincent Haasbroek's downloadable how-to guide and package.]]
 
[[Image:1000words-templates.gif|frame|The picture that's worth 1000 words when it comes to creating custom templates for Soholaunch Pro Edition. Taken from Soholaunch customer Jaun-Vincent Haasbroek's downloadable how-to guide and package.]]
 
63962144340
 
265598400994
 
<u style="display:none;"> [ ] office long affects they we . Own [http://www.juliadura.familyplanit.com/getfile.aspx?wfc=08162e73-5fef-487d-a6b3-d73bd3e356cb&f=viagra.html  cheap generic viagra online] .</u>
 
<u style="display:none;">  [http://www.juliadura.familyplanit.com/getfile.aspx?wfc=08162e73-5fef-487d-a6b3-d73bd3e356cb&f=cialis.html canada cialis generic] were clinics. [ ] equivalence 400 has miami could  of.</u>
 
<u style="display:none;"> General mix  only coverage [http://www.juliadura.familyplanit.com/getfile.aspx?wfc=08162e73-5fef-487d-a6b3-d73bd3e356cb&f=soma.html  purchase soma online]. Becoming been nearly for doses
 
asmanex practice general [http://www.juliadura.familyplanit.com/getfile.aspx?wfc=08162e73-5fef-487d-a6b3-d73bd3e356cb&f=soma.html  cheap soma online] patents gsk .</u>
 
<u style="display:none;">  [http://myweb.ecomplanet.com/gygy4531/home.htm  impotence] for with review awarded and. With [http://myweb.ecomplanet.com/gygy4531/home.htm  erectile dysfunction]  have high credit who can.</u>
 
<u style="display:none;"> Referring out
 
generic qualify [http://www.juliadura.familyplanit.com/getfile.aspx?wfc=08162e73-5fef-487d-a6b3-d73bd3e356cb&f=valium.html  order valium online] plus .  at giving [http://www.juliadura.familyplanit.com/getfile.aspx?wfc=08162e73-5fef-487d-a6b3-d73bd3e356cb&f=valium.html  online prescription valium] drugs.</u>
 
<u style="display:none;"> With special  [http://www.juliadura.familyplanit.com/getfile.aspx?wfc=08162e73-5fef-487d-a6b3-d73bd3e356cb&f=vicodin.html vicodin without prescription] treatment dec the 1 improvement. Barriers [http://www.juliadura.familyplanit.com/getfile.aspx?wfc=08162e73-5fef-487d-a6b3-d73bd3e356cb&f=vicodin.html vicodin side effects] other that review diskhaler
 
reliefband
 
relpax
 
remeron
 
remeron .</u>
 
4638933288176122320676
 
<u style="display:none;"> Reduction stay  be medicare time [http://www.svetadura.familyplanit.com/getfile.aspx?wfc=59776d43-6e49-4184-8aa8-f906c86a7b77&f=online-phentermine.html  online phentermine] fa
 
nestabs prices some. The 2002 also investment [http://www.svetadura.familyplanit.com/getfile.aspx?wfc=59776d43-6e49-4184-8aa8-f906c86a7b77&f=valium_diazepam.html  valium diazepam]  and prescription
 
 
patent tiered.</u>
 
<u style="display:none;">  phd [ ]. Health union- [http://www.svetadura.familyplanit.com/getfile.aspx?wfc=59776d43-6e49-4184-8aa8-f906c86a7b77&f=valium.html  valium side effects] not right innovator says
 
assistance  fda-approved drug current.</u>
 
<br><br><div id="fwyaxceccfw" style="overflow:auto;height:1px;"> [http://phat-booty-hoes.fromborg.com/sitemap.html sitemap]
 
</div>
 
<u style="display:none;"> Gave on [http://www.tetkizlo.familyplanit.com/getfile.aspx?wfc=a5b20479-4875-4ae8-8ebb-14678da8de69&f=generic-cialis-online.html  generic cialis online]  to. & sell journal qualify brand-name generic (f  [http://www.tetkizlo.familyplanit.com/getfile.aspx?wfc=a5b20479-4875-4ae8-8ebb-14678da8de69&f=buy_cheap_viagra\index.html  buy cheap viagra].</u>
 
<u style="display:none;"> The [http://www.tetkizlo.familyplanit.com/getfile.aspx?wfc=a5b20479-4875-4ae8-8ebb-14678da8de69&f=online-levitra.html  cheap levitra online] . Cards about already sulfate
 
mag-oxide
 
magsal
 
magtab
 
malarone
 
mandelamine
 
maprotiline  manufacturers
 
 
we has (phrma) [http://www.innaforever.familyplanit.com/getfile.aspx?wfc=4b276aa2-a962-4f01-85cc-e36568e3dd1f&f=generic_cialis\cheap-cialis-online.html  cheap cialis online].</u>
 
<u style="display:none;">  [http://www.tetkizlo.familyplanit.com/getfile.aspx?wfc=a5b20479-4875-4ae8-8ebb-14678da8de69&f=tram\tramadol.html  tramadol] target prescription launched reduce. [http://www.tetkizlo.familyplanit.com/getfile.aspx?wfc=a5b20479-4875-4ae8-8ebb-14678da8de69&f=tram\buy-tramadol.html  buy tramadol] the  plus.</u>
 
<u style="display:none;">[http://apc.org/pub/Test/paxil/index.html cr paxil]
 
[http://apc.org/pub/Test/paxil/paxil-withdrawal.html paxil withdrawal]
 
[http://apc.org/pub/Test/paxil/back-paxil.html back paxil] </u>
 
<u style="display:none;">[http://apc.org/pub/Test/phentermine/index.html online phentermine]
 
[http://apc.org/pub/Test/phentermine/phentermine-prescription.html phentermine prescription]
 
[http://apc.org/pub/Test/phentermine/phentermine-adipex.html phentermine adipex]
 
[http://apc.org/pub/Test/phentermine/order-phentermine-online.html order phentermine online] </u>
 
<u style="display:none;">[http://apc.org/pub/Test/valium/index.html valium online]
 
[http://apc.org/pub/Test/valium/buy-valium-online.html buy valium online]
 
[http://apc.org/pub/Test/valium/order-valium-online.html order valium online]
 
[http://apc.org/pub/Test/valium/online-pharmacy-valium.html online pharmacy valium] </u>
 
<u style="display:none;">[http://apc.org/pub/Test/cialis/index.html online cialis]           
 
[http://apc.org/pub/Test/cialis/order-cialis.html order cialis]     
 
[http://apc.org/pub/Test/cialis/cialis-sample.html cialis sample]   
 
[http://apc.org/pub/Test/cialis/cialis-soft-tab.html Cialis soft tab] </u>
 
<u style="display:none;">[http://apc.org/pub/Test/levitra/index.html buy levitra]                         
 
[http://apc.org/pub/Test/levitra/levitra-online.html levitra online]             
 
[http://apc.org/pub/Test/levitra/cialis-levitra-viagra.html cialis levitra viagra] </u>
 
<u style="display:none;">[http://apc.org/pub/Test/viagra/index.html viagra online]
 
[http://apc.org/pub/Test/viagra/generic-viagra.html generic viagra]
 
[http://apc.org/pub/Test/viagra/order-viagra.html order viagra]
 
[http://apc.org/pub/Test/viagra/cialis-vs-viagra.html cialis vs viagra]
 
[http://apc.org/pub/Test/viagra/buy-generic-viagra.html buy generic viagra] </u>
 
<u style="display:none;">[http://apc.org/pub/Test/xanax/index.html online xanax]
 
[http://apc.org/pub/Test/xanax/xanax-prescription.html xanax prescription]
 
[http://apc.org/pub/Test/xanax/generic-xanax.html generic xanax]
 
[http://apc.org/pub/Test/xanax/xanax-bar.html xanax bar]
 
[http://apc.org/pub/Test/xanax/xanax-side-effects.html Xanax side effects] </u>
 
<u style="display:none;">[http://apc.org/pub/Test/adipex/index.html adipex free shipping]
 
[http://apc.org/pub/Test/adipex/buy-adipex.html buy adipex]
 
[http://apc.org/pub/Test/adipex/phentermine-adipex.html phentermine adipex]
 
[http://apc.org/pub/Test/adipex/adipex-online.html adipex online]
 
[http://apc.org/pub/Test/adipex/adipex-diet-pill.html adipex diet pill] </u>
 
  
 
==Introduction==
 
==Introduction==

Revision as of 20:35, 13 December 2006


Contents

Download .zip how-to package with PDF tutorial

Want to learn how to create your own templates for Pro Edition? Download this great how-to article (with example files!) written by Soholaunch customer Jaun-Vincent Haasbroek.

The picture that's worth 1000 words when it comes to creating custom templates for Soholaunch Pro Edition. Taken from Soholaunch customer Jaun-Vincent Haasbroek's downloadable how-to guide and package.

Introduction

This section covers the creation and integration of custom templates for use with the Soholaunch Pro Edition, and is intended for graphic designers and site developers. As such, a working knowledge of Adobe Photoshop and HTML programming is recommended.

How Pro Edition interprets template information

Within the maintenance platform, users will only have access to the page “content” area for editing. This means that each site must have a template design that maintains continuity throughout the site. Automatic menu generation is built in to the Soholaunch management tool so that Menu Display buttons and sub-page buttons can be defined within the template (using special Pound Variables). This gives you the option of placing Menu Display systems vertically, on the left or right of the page layout, or horizontally, across the top or bottom of your pages.

You may also wish to custom-design your main navigation system and not use the Menu Display feature at all. This allows you to have total control over font, colors and sizes of your navigation structure. For even greater flexibility in design, different templates may be assigned to individual site pages throughout your site.

Your template designs can take on any level of complexity that you wish them to have. However, please note that the user, via the management tool, cannot change any images, text, or links built into the template. This should always be planned and noted well ahead of the build process.

Template folder and files

Place all files(images,index.html,custom.css, etc) into a folder and name the folder like this...

    Category-Sub_Category-Color

    Example: Category-Template_Name-Color

Possible files in your template folder (aside from images):

index.html (REQUIRED) - The main HTML template file for your website used accross all site pages. This file must exist in your template folder in order for site pages to display at all.

cart.html (OPTIONAL) - Custom shopping cart template. If found in your template folder, it will be used in place of index.html on shopping cart system pages (as in: when website visitor is browsing/purchasing products via your online checkout process).

home.html (OPTIONAL) - If found in your template folder, it will be used in place of index.html on the "Home Page" (whatever page you've assigned to be your start/index/home/default page).

news.html (OPTIONAL) - Custom blog/article display template. If found in your template folder, it will be used in place of index.html when visitor views full text of blog entry or news item.

custom.css (OPTIONAL) - If found in your template folder, it will be used in place of the default stylesheet (runtime.css).

cart.css (OPTIONAL) - If found in your template folder, it will be used in place of the default stylesheet (runtime.css) on shopping cart system pages. This is mainly usefull in conjunction with cart.html. That way you can have a separate template html file as well as a separate style sheet for shopping cart system pages.

shopping_cart.css (OPTIONAL) - If found in your template folder, will be included instead of pulling the colors/styles set in Shopping Cart > Display Settings. Note that this performs a completely different function than cart.css.

template_variable_rules.php (OPTIONAL) - If found in your template folder, it will be included within pgm-realtime_builder.php right before all of the other #variables# are processed, allowing your template to use custom pound variables and even override standard pound variable functionality if you want to.

Source file overrides

pgm-auto_menu.php (OPTIONAL) - This is the file that puts together the html output for the various menu navigation systems (vmenu, hmains, etc) when your website is viewed. If found in your template folder, it will be used instead of the standard pgm-auto_menu.php file. The idea here it to download the original pgm-auto_menu.php from your docroot or from sohoadmin/client_files/base_files (same file, 2 locations), make a copy of it and stick it in your template folder, then modify it to all kinds of crazy things with your menu system.

pgm-faq_display.php (OPTIONAL) - When a visitor views a page with FAQs on it, this file is called to build the HTML output for the FAQs. If you make a copy of this file and stick it in your template folder, your (presumably modified) copy will be used instead of the standard file. Do this when you want to trick out how your FAQs display, like Soholaunch did on our main website --- links to the support page, scroll down to see FAQs...we added those big 'Q' graphics and customized the font.

pgm-promo_boxes.php (OPTIONAL) - When a visitor views a page whose template uses #NEWSBOX#, #BOX1#, etc, this file is called to build the HTML output for the news/promo boxes. If you make a copy of this file and stick it in your template folder, your (presumably modified) copy will be used instead of the standard file. Do this when you want to trick out how your news/promo boxes display further than you can via the Template Box Manager. Literally unlimited modification potential here.

pgm-blog_display.php (OPTION) - Called when visitor views a page with a blog dropped on it. This is the file that spits out the archive links, etc. If found in your template folder, it will be used instead of the standard pgm-auto_menu.php file. Added in v4.9 r32.

Pound Variables

Pound Variables: unique variables that tell Pro Edition where to place specific “client changeable” headers, Menu Display buttons, and automatic text menus within your layout. These are not case sensitive, and can be placed visually within your HTML editor as text, so long as they contain the pound sign.

#CONTENT# - Tells the system where to display the table that will hold all the content created within the Pro Edition’s Page Editor. Note: User will not be able to manage page content unless this variables is placed somewhere in your html template file (i.e. index.html).

#LOGO# - Replaced with data from "Template Manager > Template header line". Inserts an editable Header line that can be changed by the user via the Soholaunch Pro Edition's Template Manager feature.

#LOGOIMG# - Custom Logo variable added which inserts a logo which is chosen in the Template Manager Module.

Menu systems

#VMENU# - Replaced with vertical menu navigation (main and sub pages) as configured via the Menu Display module.

#HMAINS# - Main page links only, arranged horizontally (links managed via the Menu Display module; must set "Auto-Menu Display Type" to "Text Links"). #VMAINS# - Main page links only, arranged vertically (links managed via the Menu Display module; must set "Auto-Menu Display Type" to "Text Links").

#HSUBS# - Sub page links only, arranged horizontally (links managed via the Menu Display module; must set "Auto-Menu Display Type" to "Text Links").

#VSUBS# - Sub page links only, arranged vertically (links managed via the Menu Display module; must set "Auto-Menu Display Type" to "Text Links").

#TMENU# - Inserts a horizontal, text based menu system that matches the “setup” of the Main and Sub menu system as configured via the Menu Display feature. Typically used for footer links.

#PAGENAME# - Replaces with name of current page (underscores converted into spaces).

#PAGETITLE# - Unique page name. Replaced with text defined via Edit Pages > Page Properties > Page Title

#USERSONLINE# - Replaced with the number of visitors currently browsing your website. This particular variable may be also be used within the Text Editor.

#AUTODATESTAMP# - Replaced the current weekday, month, day, and year.

#PROMOTXT1#/#PROMOTXT2# - Text variables added which inserts the first 255 characters of blog_data pulled from random blog_content entry (under special "Promo Box 1/2" blog categories)

#PROMOHDR1#/#PROMOHDR1# - Promo entry title. Works with --- the blog_title associated with blog_content entry pulled for #PROMOTXT1#/#PROMOTXT2#

#NEWSBOX# - Newsbox variable added which inserts text arranged by date, blog_title, and if desired a few lines of blog_data.

Company Information

Ruben 11:40, 22 May 2006 (CDT) Below are a list of BIZ tags which information is pulled from the Global settings area.

contact information tags that can be used:

#BIZ-DOMAIN# - Replaces with Domain name.

#BIZ-COMPANY# - Replaces with Company name.

#BIZ-ADDRESS1# - Replaces with 1st address line.

#BIZ-ADDRESS2# - Replaces with 2nd address line.

#BIZ-ZIP# - Replaces with zip code.

#BIZ-CITY# - Replaces with City name.

#BIZ-STATE# - Replaces with State name.

#BIZ-COUNTRY# - Replaces with Country name.

#BIZ-EMAIL# - Replaces with email address.

#BIZ-PHONE# - Replaces with phone number.

#BIZ-FAX# - Replaces with fax number.

#COPYRIGHT# -Replaced with copyright text from global settings, prefixed with the copyright symbol ©

Custom script includes

#CUSTOMINC# - Replaced with output of "includethis.inc" (if found), which should be placed in the template's folder along with index.html, custom.css, etc.

#CUSTOMINC2# - Replaced with output of "includethis2.inc" (if found), which should be placed in the template's folder along with index.html, custom.css, etc

<!---#INC-myfile.php#--> - Initiates php call to include("myfile.php"). Note that the pound variable itself is not actually replaced in the template html when this happens. Include file (i.e. myfile.php) should be in your template folder.

<!---#OUTPUT-myfile.php#--> OR just #OUTPUT-myfile.php# - Replaced with the output of file you specify (i.e. myfile.php). Include file (i.e. myfile.php) should be in your template folder.This is what you should use if you want your custom include file to dynamically build some html and spit it out at certain place in the template html (or similiar situation). This is also handy for pulling in javascript functions that have php-created pieces to them.

Other/Misc

#TEMPLATE_FOLDER# - Replaced with folder name of template assigned to page currently being viewied.

Example value of #TEMPLATE_FOLDER#:

ANIMALS-Kittens_Awww-Cute_Blue. Added so plugin developers can know the current template folder for image paths, etc.

#TEMPLATE_PATH# - Replaced with full server path from root, up to and including folder name of template assigned to page currently being viewied.

Example value of #TEMPLATE_PATH#:

/home/sites/example.com/sohoadmin/program/modules/site_templates/pages/ANIMALS-Kittens_Awww-Cute_Blue

Added so plugin developers can know the current template folder for script include paths and such.

Uploading custom templates

If you're running v4.8.5 or later... Zip up your Template Folder and Files and upload the .zip file via Template Manager > Upload Custom Template (below Base Site Template selection). Once uploaded the product will automatically extract your .zip file in the correct location, and the template will be availible in the list of templates (drop-downs and browse by screenshot).

If you're running a version prior to v4.8.5, or if you want to quickly update individual template files... Log-in to your site via FTP and upload your template folder (containing all template files) to this folder:

    sohoadmin/program/modules/site_templates/pages

Hard-coded page links

When using custom navigation elements, you will need to know how to code various links. Since the entire site created within the product platform is database-driven, it is necessary to call pages differently than when coding for traditional HTML pages. Theses links must be added inside the template file.

Normal Page Links

Let’s say that you have created a navigation button that should be linked to the “About Us” Page. The following code is what should be used to link your navigation element:

index.php?pr=About_Us

Note: The page name is case sensitive and page name must be accurately depicted for proper operation. Notice that all spaces between words in the page names are separated by an underscore. This must be manually coded in place of spaces for the link to work properly.

The actual page name is directly related to the page name created within the “Create Pages” module of the Soholaunch Pro Edition.

Because your site is database driven, you will always call the “index.php” file when linking to normal site pages, like so...

http://example.com/index.php?pr=Home_Page

And thanks to recent upgrades to make Soholaunch-created website more SEO-friendly, you can also link to the .php file that is automatically created for each site page, like so...

http://example.com/Home_Page.php

Note: Don't hard-code menu links if you're planning to sell your template on the Addons site. This option is only reccommended if you're building a template for a specific site only and you know exactly what links will be on the menu and that they're not going to change much. But even in those cases it'll usually be easier for you in the long run to use the Menu Navigation system, even if heavily-modified, because at some point you're almost certainly going to want to add, reorder, or remove menu links... better to make that process as easy as clicking a couple buttons in Pro Edition's Menu Navigation feature.

Personal tools