[support] help with php in a template

Metzler, David metzlerd at evergreen.edu
Fri Jul 25 00:02:34 UTC 2008


Got it ok so that means you need to put a test in your template around
the generation of the link, but first we need to figure out what where
the node reference ID is, for this, installing the devel module is most
helpful, cause you can configure it to dump the node structure for you
for themeing purposes. 

Another way is to put a <?php print_r($node);  ?> statement to examine
the node structure. 

Then you wrap in an if statement

<?php if (somecomplex node expression that tests to see if the refernce
field is null) { ?> 
  conditional content goes here
<?php } ?>

Does that make some sense? 

Dave



-----Original Message-----
From: support-bounces at drupal.org [mailto:support-bounces at drupal.org] On
Behalf Of Simone Dal Maso
Sent: Thursday, July 24, 2008 12:01 PM
To: support at drupal.org
Subject: Re: [support] help with php in a template

Hi,
you wrote:


> Need more information to help.  Are the podcasts a field in the PDA 
> content type, or are they adiffent related node? OR are you just 
> assuming a link convention?

podcast is a type of content.

    when users make a new podcast, they can select from a combobox, that
is a list of pda's models,  the right pda for which they want to upload
their podcast.
The combobox is a cck nodereference field, that lists all models of PDA,
based on the PDA type of content.
then, when a user make a podcast, its url is like:
www.mysite.com/podcast/podcast_of_pdaname_written_by_authorname
where pdaname is the name of PDA selected by the user, and authorname is
the name of the user.
the title of the page is made automatically by automatic nodetitle
module.
so, to summerize, we have 2 type of contents, pda and podcast.
tell me if I should explain better.





--
[ Drupal support list | http://lists.drupal.org/ ]


More information about the support mailing list