DrupalBin
Submit Code
About
Recent Posts
Problemas com o submit
Fix for extranet
extranet
Fix for drush make snippet for apachesolr library
Fix for Embedding Google Maps, use object instead of iframe with XHTML Strict
Code
Serializable closures
Closures in menu item arguments
dpr($content['field_headshot'])
Fix for Git push error
more
User login
Log in using OpenID:
What is OpenID?
Username:
*
Password:
*
Log in using OpenID
Cancel OpenID login
Create new account
Request new password
Tags
CCK
drupal
fapi
jquery
menu
module
php
simpletest
taxonomy
test
theme
views
more tags
Home
template
Node Templates by NID
March 10, 2011 - 12:45am — Anonymous
/**
* Override or insert variables into the node templates.
*
* @param $vars
* An array of variables to pass to the theme template.
* @param $hook
* The name of the template being rend
d6
nid
node
template
Read more
use a CCK field to switch node templates
April 30, 2010 - 8:58am — Anonymous
// ----------------------------- node templates
// $vars['template_files'] holds an array of template suggestions,
// from most generic to most specific.
// Here we add our own suggestions
CCK
template
theme
Read more
Fix for changing user login block template
March 18, 2010 - 8:51am — Anonymous
<?php
$form
[
'name'
]
[
'#title'
]
=
$form
[
'pass'
]
[
'#title'
]
=
''
;
$form
[
'name'
]
[
'#size'
]
=
6
;
?>
<div id="user_login_block">
<div id="user-name">
<?php
print
drupal_render
(
$form
[
'name'
]
)
;
?>
</
Form API
template
user
user_login_block
Read more
Overriding template suggestions
March 20, 2009 - 5:52am — Anonymous
function
phptemplate_preprocess_page
(
&
$vars
)
{
// Content switching
$vars
[
'template_files'
]
[
]
=
'page-'
.
$node
-
>
type
;
}
drupal6
phptemplate
template
theme
theming
changing user login block template
March 11, 2009 - 9:33am — Anonymous
<?php
$form
[
'name'
]
[
'#title'
]
=
$form
[
'pass'
]
[
'#title'
]
=
''
;
$form
[
'name'
]
[
'#size'
]
=
6
;
?>
<div id="user_login_block">
Form API
template
user
user_login_block
Read more
CCK Text field snippet within node-<type>.tpl.php works
November 27, 2008 - 4:12am —
Sheppard
/*
* Code for BassPlaya
* I've tested this locally and it works for me
* the first part of the condional is if it's a view it will truncate it
* to 8 chars.
CCK
node.tpl.php
template
Read more
node suggestions
November 12, 2008 - 5:01pm — Anonymous
function
_phptemplate_variables
(
$hook
,
$vars
)
{
if
(
$hook
==
'node'
)
{
// Here is the way to switch to a different node-<something> template based on node properties.
node
suggestion
template
Read more
Node suggestions
November 12, 2008 - 12:23pm — Anonymous
if
(
$hook
==
'node'
)
{
$vars
[
'template_files'
]
=
array
(
'node-'
.
$vars
[
'node'
]
-
>
nid
)
;
return
$vars
;
}
node
suggestion
suggestions
template
call template file, pass variables
August 5, 2008 - 11:41pm — Anonymous
<?php
$text
=
theme
(
'apply_template'
,
$data
)
;
return
$text
;
function
theme_apply_template
(
$data
)
{
ob_start
(
)
;
include
path_to_theme
(
)
.
'/my-block.tpl.php'
;
block
template
theme
Read more
custom node template
June 26, 2008 - 9:44am — Anonymous
<div class="content">
<?php
print
content_format
(
'field_buildings_img'
,
$field_buildings_img
[
0
]
)
;
?>
<?php
print
check_markup
(
$node
-
>
content
[
'body'
]
[
'#value'
]
)
?>
CCK
template
theme
Read more
1
2
next ›
last »