Support for node id arguments in the path
| Project: | View Alias |
| Version: | 6.x-2.0-beta6 |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Hi,
While this module seems to be really nice, it lacks one scenario that is very common and actually already implemented in Drupal somewhere - a subpage of a node.
This is implemented already for feeds, i.e. for every node, you can specify the feed subpath string in pathauto and then can access the feed for that node via node-alias-here/feed instead of nodeid/feed.
It would be really amazing if something like this would be possible in the current module, so that we could create subpages for content that is related to the given node, e.g. images of an event. Right now I have the images referencing the event using a CCK field and then a view that takes one argument, so it looks like events/6/images. Would be great if it looked like events/event-name/images though. Think this is possible? Let me know if I can explain more or help more.
Thanks,
Martin

#1
Assuming all you have a taxonomy vocabulary with all your event names, and the argument in your view is a taxonomy term ID, then this is already possible with the current View Alias module.
#2
Hi, been a while since I had my hands on this project.
Your idea sounded good, but eventually I run into the following problem - I have a taxonomy of all event names, generated by the NAT module, however, when I set the term id as an argument in the view, I cannot find the corresponding node and fetch any related data, because the view doesn't know its nid or title or anything.. You see my point?
I'm still for aliasing nid's to title unless you have another idea which I'd be happy to hear :)
Thanks!
Martin
#3
If I understand you correctly, you have "Event" nodes and you have "Image" nodes. For each Event you create, NAT creates a corresponding taxonomy term in your event vocabulary. Each Image node is then tagged with the taxonomy term corresponding to the event at which it was taken. Is this close so far?
In this case, you would create a Node View with a Term ID argument and filter it to only show Image nodes. You will then end up with a list of Image nodes containing the taxonomy term indicated by your Term ID argument. You can set the view to display your actual images, or links to the image nodes, or whatever. But the View Alias module should have no problem dealing with this view.
If my assumptions are wrong, then you'll have to give me more information about how your site is structured.
#4
Hi and thanks for the quick response,
Yours is another interesting idea that I might try.
What I have right now are, as you said, event and image nodes, however, the image nodes are connected to events via a "node reference" field, they don't have the event's taxonomy term set automatically like you suggested.
I didn't have taxonomies initially because using the node reference should be really enough to connect the two and I would love it if that would be sufficient. I can imagine that the way you suggested it would certainly work, but then I would have two connections between events-images: one with node_reference and one with the taxonomy terms.
The question is thus if there's a chance you could introduce aliasing node ids or do I have to switch to taxonomies and drop node_reference?
Thanks!
Martin
#5
To be honest, I didn't understand why you would be using taxonomy terms to link nodes rather than node reference fields to begin with. That's just what I thought I was picking up from your post. Now I see I was misreading it.
I think you're correct that this module concerns itself solely with taxonomy terms, so it likely will not help you much with a node ID reference. That being said, the idea of linking nodes through taxonomy terms makes me nervous.
Now that I see what you're really doing, I fully support this feature request. It's a good use-case to consider.
#6
Probably a good candidate for making use of Tokens module.
#7
Hi,
The use of taxonomy terms was actually your suggestion/idea in your first reply, I thought I'd give it a try after that :)
I probably should have been clearer when I said "Right now I have the images referencing the event using a CCK field" initially.. by CCK field I meant of course a node reference field..sorry bout all the confusion.
And I'm happy you support the request! Looking forward to having the feature in the module.
Let me know if I can help somehow.
Thanks,
Martin
#8
Can you use tokens in View path aliases? How would that work?
#9
I don't think you can. Otherwise there would be no point in the View Alias project would there.
#10
That's what I thought.
#11
Hi again,
So I understand correctly - you will look into this in some of the upcoming releases?
Just checking, thanks!
Martin
#12
@arski
Sorry if I misled you, but I have no association with this module. Nor am I really a module developer (I'm more a front-end guy). I'm just a Drupal user with an interest in improving the user experience. When I said I support this request, I meant that I think it is a good idea and I too would love to see it implemented. Unfortunately, I lack the skills to do so myself.