I've tried to implement a user page with ajax tabs using the following modules:

- usernode
- node family
- node profile
- content templates
- jstools (tab module of course)
- automatic nodetitles

My idea is, that on the usernodes top appears the user's image. On the bottom usernodes child nodes should be shown in tabs. I've tried to get it with the content templates, but I haven't found a solution because there's not a variable for each section (child node).

Has anyone already set up such profile pages? Does anybody have any idea how I could resolve this problem?

Comments

drumdance’s picture

We ended up writing our own module, but there might be a way to this via the theme. Here's an example profile:

http://www.yourclimbing.com/user/badash

---
The following sentence is true.
The preceding sentence is false.
http://www.AskDerekScruggs.com

Grooviak’s picture

That's a very nice solution!

Maybe it would be better, if I try to set up a own module...

gmasky’s picture

drumdance,

How did you implement the drop down menus?

brenda003’s picture

Your question is rather general and I don't know of a tutorial which covers quite what you need, but it's definitely possible with those modules. What specifically are you having trouble with, how far have you gotten, etc? These nodeprofile tutorials are helpful too - http://drupal.org/node/129957

You could also use views within the tabs http://drupal.org/node/124750 - which a similar concept may work depending on how your profiles are set up.

Grooviak’s picture

brenda003,

Thanks! The views use within the tabs brought me back on right way, I think. It should be possible, to load other nodes variables within the tabs. I keep working on it. Maybe I will find some other helpfully postings...

How my profile page looks at the moment (not very impressive, i know):

http://www.2gether.org/?q=node/1

The ConTemplate includes the following code:

<?php

/** Load all variables */

    /** profile tab */
    
    $module = 'node';
    get_author_nid($author_name);
    $delta = $author->uid;

    $block = (object) module_invoke($module, 'block', 'view', $delta);
    $block->module = $module;
    $block->delta = $delta;

    $tab_profile = theme('block', $block);




/** Node Content */


/** Header */

print "<img src=\"$node->picture\" alt=\"$node->name\">";


/** Tabs */

    $form = array();

    $form['profile'] = array(
        '#type' => 'tabset',
    );

    $form['profile']['userprofile'] = array(
        '#type' => 'tabpage',
        '#title' => t('Profil'),
        '#content' => $tab_profile,
    );

    $form['profile']['interview'] = array(
        '#type' => 'tabpage',
        '#title' => t('Interview'),
        '#content' => $tab_B,
    );

    $form['profile']['gallery'] = array(
        '#type' => 'tabpage',
        '#title' => t('Album'),
        '#content' => t('Third tab content.'),
    );
    
    $form['profile']['friends'] = array(
        '#type' => 'tabpage',
        '#title' => t('Freunde'),
        '#content' => t('Third tab content.'),
    );
    
    $form['profile']['media'] = array(
        '#type' => 'tabpage',
        '#title' => t('Media'),
        '#content' => t('Third tab content.'),
    );

    $form['profile']['gb'] = array(
        '#type' => 'tabpage',
        '#title' => t('G&auml;stebuch'),
        '#content' => t('Third tab content.'),
    );

    return tabs_render($form);

?>
Grooviak’s picture

I won't give up!

Maybe someone can help me with this:
How can I get the value from another node in the same nodefamily? All I want to do, is to load the variables of a child node...

gemini’s picture

I just did my tabs exactly the same way. I'm guessing you probably found the answer to your question by now, but if not.. here it is:

$children = nodefamily_relation_load($nid);
      foreach ($children as $childnode) {
        print node_view($childnode);
      }
   

btw, I learned a valuable lesson with Drupal - read the README.txt files for modules - very often they have some insights on their internal functions... or just look inside of the *.module file ;)

BTW, would you let me know how your tabs working in IE? Mine are fine in Firefox, but in IE after clicking a few times on the tabs it freezes up and runs CPU to 100% which makes me to terminate the browser... not good and I haven't found the solution for it yet.