automatic nodetitle show a cck field

drozzy - May 28, 2007 - 16:10

Hello,
I must be really stupid or something...
I using automatic nodetitles to set my title of the node to
Meeting on Monday 21, 2006 - 21:10pm

My content type is called meeting and my field that stores the date is called field_date_and_time

When I view my created content with Dev Load I get this for my field:

field_date_and_time

Array
(
    [0] => Array
        (
            [value] => 2007-05-14T16:00:00
        )

)

Now I already tried everything including:
  Meeting on <?php print $node->field_date_and_time[0]['value'];  ?>
and also
  Meeting on <?php print $field_date_and_time[0][value];  ?>
and anything else that could come to my mind.

But all i get as a result is just the words "Meeting on".

Any help would be much appreciated.

anyone help?

drozzy - May 29, 2007 - 05:52

Sorry for bump, but I could really use someone who understands dis.
Thanks again.

where do you execute this code?

derjochenmeyer - June 6, 2007 - 09:32

You are probably trying to build the node title in your content type administration form like that, right? It could be the wrong approach.

Install the Token Module and go to the configuration of your content type again.

Then you should get something like [field_date_and_time]. You should be also able to choose between a raw and formated version of the date field.

 
 

Drupal is a registered trademark of Dries Buytaert.