ok i finally finished theming my page.tlp.php file
now i would like to start workin on other pages but i cant seem to find a page-type snippet that actually works for me in 4.7

all the snippets i have found in the handbooks do not work for me

[code]


/**
* This snippet loads up different page-type.tpl.php layout
* files automatically. For use in a page.tpl.php file.
*
* This works with Drupal 4.5,  Drupal 4.6 and Drupal 4.7
*/

if (arg(0)=="admin") {/* check if the path is example.com/admin */
    include 'page-admin.tpl.php'; /*load a custom page-admin.tpl.php */
    return; }

if ($node->type == 'blog') {/* check if the path is example.com/blog  */
    include 'page-blog.tpl.php'; /*load page-blog.tpl.php */
    return; }

/*insert more layout calls here before the call to page-default.tpl.php */

include 'page-default.tpl.php'; /*if none of the above applies, load the page-default.tpl.php */
    return; }

[/code]

thats the latest code i used and it doe snot work either

anyone have a WORKING snippet i can use please?

Comments

Andrew Thomas’s picture

also do i replace my whole page.tpl.php file with a snippet or do i just add these snippets to the top of the page?

syawillim’s picture

There is a good tutorial here http://www.lullabot.com/articles/hacking_phptemplate.

www.justapickle.com
blogging community for the socially conscious

www.slickfish.com.au
professional, affordable web site design, production and maintenance for small business