Differences

This shows you the differences between two versions of the page.

Link to this comparison view

g-style_identifiers_for_ce2_engines [2011/12/18 22:37]
matthew created
g-style_identifiers_for_ce2_engines [2011/12/18 22:38] (current)
matthew
Line 1: Line 1:
-====== G-STYLE Identifiers for CE2 Engines ======+====== G_STYLE Identifiers for CE2 Engines ======
  
 G-STYLE identifiers are used to target specific gallery types when authoring PHPlugins. The following list is a comprehensive reference of G-STYLE identifiers for CE2 plug-ins. G-STYLE identifiers are used to target specific gallery types when authoring PHPlugins. The following list is a comprehensive reference of G-STYLE identifiers for CE2 plug-ins.
  
 ===== TTG CE2 Pages ===== ===== TTG CE2 Pages =====
 +
 +In TTG CE2 Pages, each page has a separate G_STYLE identity. To target all pages in a single function, see code examples below. The G_STYLE identifiers are:
 +
 +PAGES-HOME-CE2\\ 
 +PAGES-GALLERIES-CE2\\ 
 +PAGES-SERVICES-CE2\\ 
 +PAGES-INFO-CE2\\ 
 +PAGES-ABOUT-CE2\\ 
 +PAGES-CONTACT-CE2
 +
 +<code>
 +*/
 +
 +// TARGET ALL PAGES IN TTG PAGES CE
 +function ttg_user_function( $style, $path ) { 
 +
 + if(preg_match('/^PAGES-(.*)-CE2$/', G_STYLE)) {
 +
 + // FUNCTION HERE
 +
 + }
 +
 +} // END
 +
 +// TARGET SPECIFIC PAGE IN TTG PAGES CE
 +function ttg_user_function( $style, $path ) { 
 +
 + if (G_STYLE == 'PAGES-HOME-CE2') {
 +
 + // FUNCTION HERE
 +
 + }
 +
 +} // END
 +</code>
  
Print/export