Hi all! I'm using two features based on a function called _phptemplate_variables.
The first one is for showing different page templates depending on URL aliases:
<?php
function _phptemplate_variables($hook, $vars = array()) {
switch ($hook) {
case 'page':
// Add page template suggestions based on the aliased path.
// For instance, if the current page has an alias of about/history/early,
// we'll have templates of:
// page_about_history_early.tpl.php
// page_about_history.tpl.php
// page_about.tpl.php
// Whichever is found first is the one that will be used.
if (module_exists('path')) {
$alias = drupal_get_path_alias($_GET['q']);
if ($alias != $_GET['q']) {
$suggestions = array();
$template_filename = 'page';
foreach (explode('/', $alias) as $path_part) {
$template_filename = $template_filename . '_' . $path_part;
$suggestions[] = $template_filename;
}
}
$vars['template_files'] = $suggestions;
}
break;
}
return $vars;
}
?>
The second one is for showing different node templates based on the UID of the node publisher:
<?php
function _phptemplate_variables($hook, $vars) {
$variables = array();
I was wondering if there was a way for a homepage to show two drupal entries at once side by side. I was planning on blogging on one side and having a photo area on the other.
I would greatly appreciate any help, I attached an image for reference.
I was interested in knowing if someone could explain to me how to change the default header in the garland theme. I wish to replace it with an image made by myself.
For reference of what im talking about, please visit mydigitaldingo.com/animosity