-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnode.tpl.php
104 lines (83 loc) · 2.04 KB
/
node.tpl.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
<?php
// $Id$
/**
* @file
* node.tpl.php
*/
// dsm($node->links);
// foreach ($node->links as $key => $value) {
// print $node->links[$key]['title'];
// }
/**
* dsm(get_defined_vars())
* dsm($variables['template_files']);
* dsm($node);
* dsm($node->content);
* print $FIELD_NAME_rendered;
*/
/**
* $links splitted up
* <?php print $statistics_counter; ?>
* <?php print $link_read_more; ?>
* <?php print $link_comment; ?>
* <?php print $link_comment_add ?>
* <?php print $link_attachments; ?>
*/
/**
* ad a class="" if we have anything in the $classes var
* this is so we can have a cleaner output - no reason to have an empty <div class="" id="">
*/
if ($classes) {
$classes = ' class="'. $classes . '"';
}
if ($id_node) {
$id_node = ' id="'. $id_node . '"';
}
?>
<?php
if ($page == 0) { ?>
<div<?php print $id_node . $classes; ?>>
<?php if ($node->title) { ?>
<h2><a href="<?php print $node_url ?>" title="<?php print $title ?>"><?php print $title ?></a></h2>
<?php } ?>
<div class="meta">
<?php if ($node->picture) { ?>
<?php print theme('imagecache', 'preset_namespace', $node->picture, $alt, $title, $attributes); ?>
<?php } ?>
<?php print theme('username', $node); ?>
<?php print format_date($node->created, 'custom', "j F Y") ?>
</div>
<div class="content">
<?php print $content;?>
</div>
<?php if ($links) { ?>
<?php print $links; ?>
<?php }; ?>
</div>
<?php
}
else{
//Content
?>
<div<?php print $id_node . $classes; ?>>
<?php if ($node->title) { ?>
<h1><?php print $title;?></h1>
<?php } ?>
<div class="meta">
<?php if ($picture) { ?>
<?php print $picture; ?>
<?php } ?>
<?php print theme('username', $node); ?>
<?php print format_date($node->created, 'custom', "j F Y") ?>
<?php if (count($taxonomy)) { ?>
<?php print $terms ?>
<?php } ?>
</div>
<?php print $content ?>
<?php print $node_region_two;?>
<?php print $node_region_one;?>
<?php if ($links) { ?>
<?php print $links; ?>
<?php } ?>
</div>
<?php }