Mark,
Perhaps you are not familiar with the Drupal Dojo group, which has an ongoing series of lessons covering these and other interesting stuff, just the thing for people getting more involved in intermediate and advanced Drupal fine tuning and more.
The group: http://groups.drupal.org/drupal-dojo
Special group site with lesson roundups: http://drupaldojo.com
Class notes on theming lesson that was broadcast (you can download the notes and the code from the class, and maybe even the old video podcast):
1. notes: http://groups.drupal.org/node/2764 2. more references on the same lesson: http://drupaldojo.com/lesson/theming-and-the-themer-pack
saludos,
Victor Kane http://awebfactory.com.ar
On 7/25/07, Mark Hope mark@markhope.net wrote:
On 25 Jul 2007, at 19:27, puregin wrote:
Hi Mark,
i'd suggest that you install Content Template (contemplate)module, and Developer Module.
Never had much success with contemplate but will look again at devel.
These will help you to discover the way to reference the fields you need. For example, you will probably need to examine
$node->field_news_type[0]['value']or something to that effect.
Also, php.net is a good source of information for basic PHP syntax.
Using these resources, you'll find your code probably looks something like this:
switch ($node->field_news_type[0]['value'] == 'Retail Week Teaser') { case 'Teaser Article': // do something break; case 'Editorial': // do something else break; case 'Full News Article': // handle this case break; }
Hope this sets you off in the right direction.
Good luck, DjunThanks for the help!
On 25-Jul-2007, at 10:55 AM, Mark Hope wrote:
I've got a CCK content type using a field called 'field_news_type'
I'm looking to conditionally output some code based on the value of the CCK field. The Field has a possible 3 values: Editorial Full News Article Teaser Article
I need to do something like:
if $field_news_type = Retail Week Teaser { //dothis }
Any pointers would be appreciated.
Thanks Mark
themes mailing list themes@drupal.org http://lists.drupal.org/mailman/listinfo/themes
themes mailing list themes@drupal.org http://lists.drupal.org/mailman/listinfo/themes