Hi everybody, I'm a newbie, I want to create a music site and I want to have a module that display a list of songs, and I also allow visitor to search the desired songs on that list. Please anyone can tell me how can I do like that?

Comments

gate44’s picture

I just recently done a similar thing for my site:

Download the Taxonomy & Views modules and install...........

For your list use a Taxonomy Term which will link them together say:

New Vocab.................

1.Vocab Name: Music

2.Content Type: lets say 'page'

3.Multiple Select

4.Save

add term..............

Term Name: Name of Song & Artist >
Save

lets do the following five songs

  • Taio Cruz - Break Your Heart
  • David Guetta Ft Akon - Sexy Chick
  • Madonna - Celebration
  • Jay-Z Ft Rihanna & Kayne West - Run This Town
  • Shakira - She Wolf

Then create a node for each song and link them together with there Taxonomy Term

Create Content > Page

Title: Name of song & artist
Select the song in Music Taxonomy

copy the above for all your songs

Save

Start Views

View Name: music_list
View Description: Music List
View Type: Node
NEXT

(The views interface can look Scary at first but once you get use to it, its really cool and powerful.)

THE FIELDS OPTION WILL SHOW WHAT RESULTS YOU WILL GET:

Click the + sign on FIELDS
Scroll down to NODE: Title > Tick
Add
Remove Label: Title
Link This Field To Its Node > Tick
Update

THE FILTERS OPTION FILTERS OUT THE INFORMATION YOU ARE ASKING FOR:

Click the + sign on FILTERS
Scroll down to Node: Published > Tick
Add

Click the + sign on FILTERS
Scroll down to Taxonomy:Term > Tick
Add

Vocabulary: Music
Selection type: Dropdown
UPDATE

Operator: Is one of
Select terms from vocabulary Music: highlight all your songs
EXPOSE

Leave everything as it is except Label: call this what you like but lets say 'Songs & Artist'
UPDATE

Below where it says Live Preview you should be able to see your Dropdown box and an Apply button....cool

Now lets turn this into a block so you can put it where you want on your site

On the left side of views make sure above the Add Display Button it says Page > Click the button

Basic Settings:
Name: Click 'Page'
Page: The name of this display > Change This To 'Music List'
UPDATE

Title: Click 'None'
Music List: The title of this view > 'Music List'
UPDATE

Exposed form in block: Click 'No' (this turns the view into a block)
Change to Yes
Click OVERRIDE (the reason you override is so this option is not used in the dafault)
UPDATE

Header: Click None
in the text area type > Song & Artist
Click OVERRIDE (the reason you override is so this option is not used in the dafault)
UPDATE

Path: Click None
in box type > music_list
UPDATE

CLICK SAVE

Views is all done.................

Position your block

Administer > Site Building > Blocks

Scroll down untill you see > Exposed form: music_list-page_1 goto its dropdown option and click where you would like to put it
SAVE

Goto Homepage and your dropdown appears...Hooray Really Cool.

I hope I have explained it well so you can get it to work, Taxon0my & Views can be a real pain until you get used them but dont give up........

Robert

tammo’s picture

Just today I was looking for this information. You taking me by the hand and leading me through, made it very easy for me.

Thank you:
http://abc.kleinestappen.nl/activiteitenoverzicht

Tammo

Tools for Research
http://www.toolsforresearch.com (international)
http://www.kleinestappen.nl (NL)

All using open source software: Drupal, Limesurvey

SamTN’s picture

Thanks for your help. Your help is clearly. I wonder if we can have a more complex search form or not?

gate44’s picture

You can add more than 1 Exposed filter and these will work with each other

Say

one search saying artist and another saying song, if you have multiple songs from multiple artist this will cut down on your dropdown box being too long.

But if you want a search box do the following:

Click the + sign on FILTERS
Scroll down to Search: Search Terms > Tick
Add

Expose

Label: what ever you want

Update.

This will give you a search box just like the normal one but this will work with your other options in the dropdown......

I asked a question on here the other day about how to use views to change the list in the next dropdown:

What I mean is lets say you want to search for a song by Abba but you have other artist, your list would be very long, but if you choose Abba in your first dropdown the next dropdown will only show Abba songs.

No one replied to this but I am working on it I think it will have something to do with Arguments.

Robert
Robert

SamTN’s picture

I can create a more complex form now, thank you very much.