1

I have created a new content type and I called it Opinion. Then using views, I have created a page with path /opinion to be a view for all nodes of type Opinion listing i.e. a master page.

The problem is that I could not able to access a the details something like /opinion/the-node-title. however, It accesed like content/the-node-title

I tried to create a new page from the regarded view with contextal filter Content title it works fine using direct access from the browsers address bar. I tried to rewrite the content on the linked title field but I could not able to find a suitable token:

<a href="[title]">[title]---</a>

i.e I could not find any way to convert title into a slug.

Another thing for SEO, I don't want the same content to be accessed from more than one resource i.e in my case content/the-node-title and opinion/the-node-title

1 Answer 1

2

You need to use pathauto module and configure URL alias >> patterns >> content paths set opinion/[node:title] path alias for opinion content type. All content path for opinion now change as your requirement.

4
  • I have set the path as you said, flush the cache, but still my view get it as content/node-title
    – SaidbakR
    Aug 31, 2015 at 6:55
  • New content will be created with alias of opinion/[node:title] apart of that you need to edit content and set its path to opinion/[node:title].
    – vgoradiya
    Aug 31, 2015 at 7:09
  • Pathauto also allows you to reset all aliases - look for a bulk update tab in the URL aliases section.
    – Darvanen
    Aug 31, 2015 at 7:40
  • Very good, but it seems that I still have a problem with the Views module. I could not able to make the details page from the view. The listing of master page renders everything fine but loading opinion/the-node-title seems to load the default display of the content type.
    – SaidbakR
    Aug 31, 2015 at 7:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.