heyy, Im setting up multiple page templates ready to customize each of them separately.
Im using Drupal 5.0 - (BlueMarine theme as a base). I've removed the print $header so I can see when a selected page has loaded that the correct template.tpl.php has been targeted.
Im targeting pages like this article says to. Renaming templates to 'page-node-1.tpl.php 'page-node-2....' ect.. but I want to target the index/front page.
So far ive tryed using this code in page.tpl.php:
I am curious about this and should mention I am new to Macs, but I am playing with the 'aquasoft' theme, and can open all the txt files in the theme, but when I open page.tpl.php TextEdit seems to be attempting to display symbols rather than ascii text. So I get a couple dots, a line, and some question marks in blue boxes rather than the code that I need to edit. Very strange. Any Mac users out there know why this is??
I am using Drupal 4.7 with CCK and pathauto (and thus clean URLs). I am using a heavily customized theme based originally on the Spread Firefox theme.
Right now I am using customized template.php and page.tpl.php files to display particular templates (page-[content-type].tpl.php) depending on the content type. Since I'm using pathauto, these don't appear as "node/nid" (although you can still go to those addresses) but as the arbitrary name of the page (e.g. http://example.com/whatever).
What I want to be able to do is to tack on something in the URL to serve users the SAME template with a DIFFERENT stylesheet. Moreover, I want to be able to have MORE THAN ONE of these.
This is basically a "stylesheet switcher," except that I want to be able to control it through the URL, and I don't want it to set a cookie (as most switchers do) because I only need the alternate stylesheet for that one page.
I have installed page_title-4.7.x-1.x-dev and flatforum-4.7.x-1.x-dev. The modules were tested and work flawlessly; however both require additions to templates.php.
The problem is that the two functions work when used separately but when both are added to templates.php I get a blank page when viewing the site. Please have a look at the code below; any help will be greatly appreciated.
<?php
/*
page_title.module addition
*/
function _phptemplate_variables($hook, $vars) {
$vars = array();
if ($hook == 'page') {
if (module_exist('page_title')) {
$vars['head_title'] = page_title_page_get_title();
}
}
return $vars;
}
I am designing a new theme for my website and am interested in contributing a generic version of it. It involves sytylized blocks with a variety of motifs and color schemes. I want to provide certain options to users of the theme. I currently have in the block.tpl.php file:
$columns = '1'; // 1 = right, 2 = left, 3 = both
$color = 'white'; //white, red, pink, etc.
Then I have logic that looks for these and adds the apprpriate class name in the HTML code. It's not a big deal for a user to open up the one file and change a couple values. Great...