Hi there, I am hoping someone can help me.

I am developing a website and have ARTISTS who are linked via the CCK to pieces of content like Album Reviews, Concert Reviews, etc.

Basically, I am struggling (and believe me, I've been messing with it for MANY hours) to get content to pull on the "Artist Pages." I feel like this is a simple argument issue, but I am really not figuring out how to pull these other related content types down so when, say, I'm on an artist page, I will see the content on the site that is related to that artist.

I am relatively familiar with views and have created an entire site already, but this page in particular is really bothering me.

I also, and I think this is related, am struggling to make a "Custom Profile" view based on the URL. I wish there the "Node Title by URL" instead of just "Node ID by URL" worked the same and am sure there HAS to be a way to do this ... right?

Thanks in advance for your help.

Edited by WorldFallz - moved to appropriate forum.

Comments

benjamin.pauley’s picture

I'm a little shaky on Views arguments myself, but my sense is that you'll have an easier time of it if your "Artists" are terms in a taxonomy vocabulary: taxonomy term id's are readily available for use as arguments in the Views UI.

That kind of system would seem well-suited to your purposes, wouldn't it? You could assign one or more taxonomy terms to your various "Albums," "Concerts," "Reviews," or what have you, which would associate each of those nodes with the relevant artist.

Apologies if this isn't quite what you're trying to do, or if it's an option you've already considered and rejected.

andrewmartin’s picture

You know what's funny, Benjamin? I literally thought about it long and hard yesterday and realized that is probably the way to go. I will give it a shot. Now the question is, can I create "Taxonomy Term" pages that are relevant to the artist name --- so I can set up "Artist Profiles" essentially? Might be more complex than necessary.

Another thought I had was to leave things the way they are, and simply hard code in a "Search" link that, when clicked, automatically searches for that particular artist name. Might save a few database calls and allow users to find all relevant data - what do you think?

Thanks for your reply.

benjamin.pauley’s picture

This is a bit beyond my depth, I'm afraid.

I wonder, though, if you've looked into the Panels module. It's not one I've done any work with, but I think you could use it to create a complex layout for an "Artist Profile" page made up of several, um, well, panels. Each of the panels, I gather, can be populated with information generated by Views, as well as with other sorts of content.

But again, I haven't tried it myself, so I'm not entirely sure if it's the solution you need...

andrewmartin’s picture

Thanks Benjamin.

The especially frustrating thing here is that, to test things out, I cleared all of the Pathauto links so I was working with "ID's" and not "artist-names" and it actually worked. I feel like this should be a feature built in by default; I mean, who wants to use ID's anyways? :)

Either way, I'm kind of stuck here and what I ended up doing (which is very, VERY lame and I admit that) is putting a hard-coded link at the bottom of the post that, when clicked, inserts a search query for that artist name. It's obviously primitive and a cheap way out, but I just can't spend any more time thinking about this right now :)

Thanks for your response. Drupal is amazing!

caschbre’s picture

You should be able to create a view that uses an ID as an argument but the path module (optionally pathauto) will still display friendly URLs. Let me see if I understand your setup...

You have a content type called Artist. Let's say you are using pathauto (/artists/[title-raw]) to get there.

You have several other content types (e.g. Album, Concert) that relate back to the Artist. Let's say now that you want to create a block to display on the artist node page that lists these content types. Let's look at the albums.

Create a (block) view that lists the albums fields, filter it and sort it how ever you like.

Now comes the critical components...

Add a relationship to the view. Filter the list of options to "Content" and you should see your node reference field. Use that.

Next you will want to add your argument (Node: NID) and select to use the relationship. Still within the argument setup scroll down to "Action to take if argument is not present:" and select "Provide default argument". For the default argument you will want "Node ID from URL".

My guess is that you're missing the relationship component.

andrewmartin’s picture

Yes, FINALLY I found the missing piece! I really appreciate your help, this worked like a charm. It is funny how simple it is to overlook something like that, because logically, it makes sense; but I missed the dropdown altogether at the top when you click "Add argument." Seeing that relationship drop down was like a miracle.

One thing I did have to change, for what it's worth, is the logic when it came to adding the argument itself; minor thing, but my "Artist Name" was tied to the "Node: Title" argument, so instead of choosing an argument for Node ID, I selected Node Title.

Either way, thank you sooo much for helping. You have no idea; I was stuck on a few other projects with this exact same issue. Love the support offered here and just wanted to say THANK YOU.

caschbre’s picture

Congrats! That's great to hear. Views, especially arguments and relationships, can be pretty daunting.

andrewmartin’s picture

I HATE to pick your brain again, but now I am running into another issue I have seen here on the site, and I figured I'd just see if you know the fix:

So, in the "testing" area where I can put in an argument and Preview the display, the block works perfectly.

The page display also, even in the actual site environment, works fine.

But, for some reason, I set this block on the Content Lower area and to only appear on "artists/*" pages (my artist profiles lie on these pages, and the asterisk acts as the argument here for the artist name), the block simply won't appear.

I ran into a similar issue with displaying blocks on the User page, but eventually it seemed to magically "resolve itself" (that is, eventually, it suddenly came up).

I cleared caches, refreshed the page, tried different browsers...any suggestions as to why this won't show up? I'd rather not use the embed_view option if I can get around it...

Thanks again!

andrewmartin’s picture

I just wanted to reiterate: Thanks again for your help. I wish I could do more than simply say "thanks," but I guess when and if I become a Drupal expert, I'll be sure to pay back the favor.

kaakuu’s picture

I'm on an artist page, I will see the content on the site that is related to that artist.

This is very nicely and appropriately done by the project workspace. You have to enable permissions so that all users' can see each others.

Slovak’s picture

For a solution that involves a view argument in the path like artist/%/reviews see Node ID as View Argument from SEO-friendly URL Path