This forum is for assistance with theme development.

Overriding $links where's the doc for 5.x?

Oh, this is driving me insane. Really.

I'm using the vote up/down module and need to display the number of points a node has, but NOT in the links section ($links), but within the content($content) section (using Contemplate).

If I insert this code in my node template:

print $node->links['vote_up_down_points']['title']

It gets printed correctly, but it also gets printed on the links section. If I disable the link on the vote up/down settings page ("Do not display link"), the variable $node->links['vote_up_down_points']['title'] is also gone in contemplate.

So, I'm trying to override the links ($links) code using http://drupal.org/node/44708 and http://drupal.org/node/134442 as a guide, but they refer to 4.7 only, and I'm too much of a newbie to be able to adapt this code to 5.2. Anyway, here's what my code looks like in template.php:

function phptemplate_links($links, $attributes = array()) {
    return _phptemplate_callback('links', array('links' => $links, 'attributes' => $attributes));
}

and in links.tpl.php:

$link_count = count($links);
print $links;

However, with this code no link section is printed out to the screen andI have no idea what I'm doing wrong... I've been reading Drupal.org for 9 hours trying to get around this problem, but no luck...

Show mission statement on all pages...how?

Hey all! I just had a quick question about the mission statement. I'm in the process of theming a drupal site I'm working on and was curious about how I could get the mission statement to show on ALL pages.

If you go to http://cygdev.corydorning.net/ you'll see the mission statement under the "Welcome to Check Your Genes" image. If you click on on of the navigation links, you'll notice it disappears.

Problems with css

Hello
I am trying to create a theme.
I am having some difficulties in my css.
When I am attaching the css file normally “
” my page is shown like as it should be.
Afterwards I tried to rename the style sheet to style.css like I read the theme tutorial and I used this lines on the head of my page



print $head_title

print $head
print $styles
print $scripts

Custom Admin Theme

Im currently doing a back end theme for a site, however when you go to create a new content piece it throws you into the frontend design.

Is there anyway to stop this, I tried adding /node/new in to template.php but it doesnt seem to want to apply the theme and just uses the site overall one.

Any help appreciated!

views question - distinct selection

Hi,

I created a view in the views module which displays the blogs posted by all the users on my site.

Is it posible to do a 'distinct' argument to only display every user in this list once?

theme files

Hello,

which are the files and talbes that get changed when one changes the theme? Once i changed my theme and having problem in login and dispaly, if i could know the talbes and files that get changed with theme i could restore my site.

best,
DT

Pages

Subscribe with RSS Subscribe to RSS - Theme development