Welcome to the Geeks & God Static Archive. Read more »

CCK, Views, and Contemplate

4.8

You are missing some Flash content that should appear here! Perhaps your browser cannot display it, or maybe it did not initialize correctly.

Let's make sites that are useful, shall we? We shall. Today we talk specifically about 3 modules that help you display your Drupal websites content in an incredibly useful way.

The modules we cover in depth are CCK, Views, and Contemplate. Think of them as the Drupal trinity...(did that go too far?) These modules, when used together, are much more powerful than they are alone. They create an entire website workflow, allowing you to create pages full of content you designate, make lists of items on your sidebar, all while making them look good. It's a workflow that's worth knowing if you're becoming a Drupaler.

But, before all that, we get a couple listener reviews. First, Tim sends us a review of Adobe's new Soundbooth program, and another listener tags a cool church tech Vodcast for us on del.ico.us.

Ready to get your geek on? Hope so.

One of the discussed modules work for this?

I think I might have asked this before but cant find it.
Using the audio module here. Right now when content is created using the audio module it has items in this order.
1. The title
2. The player
3. The content text (body)
4. Displays (Download audio file, Download Count, and how many times the audio has been played.

1. We want to move the information from number 4 to display before the body of the content. Cant figure out where we go to do that. Is this something another module would handle or is there something in the audio module itself we need to edit in order to do this?
2. How do hide certain aspects of it? For example say we only want to display the download audio file link.

Thanks guys.

theming audio module content

Let me try to nail both things...

1. This is just theming. In this case it's a matter of making a custom node.tpl.php file called node-audio.tpl.php and moving the specific elements around. You can find more details in the drupal handbook at http://drupal.org/node/11816.

Now, this is just one way to do this. There are others but I think this is the least complicated.

2. This is a matter of permissions. Go to /admin/user/access and you can set which roles can see which things for the audio module.

Matt Farina
Geeks and God Co-Host
www.mattfarina.com

Matt Farina
Geeks and God Former Co-Host
www.mattfarina.com

What do ya know. :)

I dont get a lot of what im looking at in the php file. But I can at least make out some of the terms and where it starts and ends. Thank you. I tried it out and after some playing around, it worked. Cool.
Thanks again.

Remove Taxonomy will it still show up?

If I remove the following from the node-audio.tpl.php file

<?php
print $terms
?>

Will the benefits of taxonomy still be there? I just dont want it to display but still want the functionality of it.

Correct

That's correct. If you remove this tag, it just won't PRINT the terms...they'll still be there doing their job in the background....

-Rob Feature
Geeks and God Co-Host
www.bobchristenson.com

-Rob Feature
Geeks and God Co-Host
www.mustardseedmedia.com

Cool. Thanks for verifying

Cool. Thanks for verifying that. These custom node files (is that what there called?) can come in handy.

Great episode guys. This one

Great episode guys. This one is packed full once again, is probably my favorite in the drupal series yet. It helped me figure out some things about some important modules that we will be using.
Thanks again for taking the time to do the cast. Much appreciated.

Is captcha really needed?

Were not going to have any user comments or posts on our site. Just a contact form. If this is all were going to have is captcha really needed for something like this? Or is it mainly for stopping comment spam?

You Want It

I would say you still want it on your contact form. I have seen contact forms get hit with spam, too. That's really annoying.

If anything you may want to leave it off until you start getting hit with contact form spam but leave it in your back pocket.

Matt Farina
Geeks and God Co-Host
www.mattfarina.com

Matt Farina
Geeks and God Former Co-Host
www.mattfarina.com

Sorting views based off custom metadata

Is it possible to sort a view based off of a user added metadata tag? I'm trying to sort sermon audio files by sermon date so I added a sermon_date field to the metadata for the audio module. That field does not appear in the selection box for the sort criteria in the view however. Any way to accomplish this?

Thanks so much for the info - you guys really helped me along trying to figure out how to get our sermons streaming online. Thanks!!

They are there

If you added something like that date CCK field you should be able to sort based on that. CCK fields are typically available to sort based on. I've used the date field in the past to sort on.

I'm saying this for view 1 on drupal 5. All bets are off on views 2 for drupal 6 at this point.

Matt Farina
Geeks and God Co-Host
www.innovatingtomorrow.net
www.mattfarina.com

Matt Farina
Geeks and God Former Co-Host
www.mattfarina.com

I see now...

Ahh - I see. I was thinking that to add a field to Audio Node I would have to create a new CCK type and throw in the Audio node and a date field. But I couldn't put an Audio node in a CCK type. I didn't realize you could just add a field to any existing node. Fantastic! Thanks so much!

Great episode guys. 5

5

Great episode guys. 5 stars!
god work!!