This forum is for assistance with theme development.

How do I remove the title from a menu...

I am needing to remove the title of a menu. I want to be able to enter in the words "no title" to any root menu (not menu item) and hide the title. It sounds very simple, but I am pulling my hair out. I am modifying a theme that is using PHPTemplate, here is what I have done it the template.php. For some reason it hides every menu item... not just the menu title like I was going for.

Simple odd/even 'Zebra' node classes (feedback/improvements?)

Hey,

I was looking for a way to simply add 'odd' or 'even' class names to my nodes with minimum fuss. I'm very new to PHP but think I've found a solution:

<?php if (!isset($nnum)){ $nnum=1; global $nnum;}?>
<div class="node-news<?php if ($nnum % 2 == 0){ print ' odd';} ++$nnum; ?>">

However, I'd like some feedback on if this is best practice and if anyone can see a way to improve it?

Thanks,
Fiasst

breadcrumbs customization

I recently modified the Zen theme to make my own theme and everything looks great, except I can't change the color of the breadcrumbs! The only part that changes is the :: seperators, but not the link text. Is there something that I need to do to the template.php file? I figured that if I specified the color in my style.css file that would do it?

.breadcrumb {
margin-top: 6px;
margin-left: 50px;
padding: 0;
font-size: 80%;
color: #cccccc;

}

change 'Login' url in ($links)

What can I add to template.php to change the 'Login' url in links to point to a node rather than user/login?

theming the buddylist

Hi, i am trying to theme my buddylist in the buddylist module. So i wrote my own functino to overreide the ouput, but nothing happens.

Here the codesnipet from the original function:

function buddylist_buddylisting_page($uid = NULL, $mode = 'buddies') {....  

And now my own Function:

Trouble getting theme functions overridden

Hey there,

i've already tried a bunch of stuff to get it working, including looking into the core's garland's template.php for guidance and browsing through the Drupal 6 API-documentation.

My problem is: i would like to customize the way Drupal 6 outputs the attachments of a given node. I've changed the theme_upload_attachments function to my liking, put it in my theme's template.php - just as i was used to for Drupal 5 - but it doesn't change a thing. Am I missing something? I feel like i haven't fully grasped the potentially new concept of overriding functions in Drupal 6, despite reading the "Converting 5.x themes to 6.x" / http://drupal.org/node/132442 and "Overriding theme functions" / http://drupal.org/node/173880 pages in the handbook. So now I'm hoping one of you can help me get this working.

As reference, my template.php containing only the customized function is as follows:


<?php

function phptemplate_upload_attachments($files) {
$header = '

' . t('Attachment') . '
' . t('Size') . '

';
$content = '

' . $header;
$i = 0;
foreach ($files as $file) {
$file = (object)$file;
if ($file->list && empty($file->remove)) {
$href = file_create_url($file->filepath);

Pages

Subscribe with RSS Subscribe to RSS - Theme development