Quantcast
Channel: Question and Answer » views-contextual-filters
Viewing all articles
Browse latest Browse all 57

Views, Contextual Filters, and Path Alias

$
0
0

First, a disclaimer: I am less than a year into learning Drupal just to give you a frame of reference. I am probably using incorrect terminology in my searches so if there is an answer out there, a point in the right direction would be greatly appreciated.

I am building a site that will have multiple “categories.” In each category, there will be page content. So, my URL will (should) look like this:

www.example.com/category/page

All of my pages have been put into their respective subdirectories which are named for their categories. For example:

widgets/page1  (node 10)
widgets/page2 (node 13)
widgets/page3 (node 24)
services/page1 (node 12)
services/page2 (node 15)
services/page3 (node 17)

If I type the url /widgets/page1 I get the “article” not the view. If I type in the url with node id:

www.example.com/widgets/13

The view works perfectly and shows me widgets/page2

I created a page view for widges and set its path to “widgets” so the url would be:

www.example.com/widgets

I have created a view that displays all my relevant info. I also created an “attachment” that shows me related content from the same category. This actually works quite well – it displays all the relevant content with linkable titles.

The problem that I am running into is when I click on one of the titles (or type the link directly) it no longer goes through the page view.

How do I structure this so that all links go through the views? I am missing something, I just don’t know what.

Screenshot of my Views Pageenter image description here


Viewing all articles
Browse latest Browse all 57

Trending Articles