0

I would like to create a content type, say for example Podcast, that would have other pages for some of the fields.

A field_audio that is a file would automatically generate a /node_url/audio page, a field_transcript that is a Longtext would be `/node_url/transcript etc.

My initial hypothesis is to use a views page to set the path but I am really confused with the interface and how best to solve this problem.

EDIT

In order to clarify, I'll go step-by-step for the desired functionality.

A content type is configured to publish at domain.tld/podcast/podcast-title. This content type has a lot of fields that are removed from the display using Display Suite.

What I would like to do is to use URLs that automatically generate displaying content based URL parameters, similar to how Drupal tags do but for individual nodes.

Example website: http://codepen.io/inkovic/pen/qEXJpo is the original content. http://codepen.io/inkovic/pen/qEXJpo.css is the css http://codepen.io/inkovic/pen/qEXJpo.htmlis the HTML and so forth.

I could do this manually with a contextual view + block on the actual node-url, but Views -> Contextual Filter -> Content: Nid -> Content ID form URL would break if the url is different from the actual node.

So podcast/podcast-name/transcript would render a view based on the podcast-name part of the URL.

I do not want to create a custom content type of transcript, mp3, links etc and use Entity Relationship because that would ruin the content authoring experience.

5
  • I am not fully clear about your requirement but this link may helps you drupal.org/node/1066712 drupal.org/node/458316
    – DRUPWAY
    Commented Jan 31, 2015 at 10:20
  • I'll edit my question but no, this isn't what I'm looking for. I want to create a path that renders content without creating a new node and referencing it.
    – inkovic
    Commented Jan 31, 2015 at 10:40
  • if i am not wrong you want to display a page which contain all the audio field data present in POdcast content type.
    – DRUPWAY
    Commented Jan 31, 2015 at 10:54
  • No, I want to render a contextual view but since I want the URL to be different the typical Nid -> Content ID from URL doesn't work.
    – inkovic
    Commented Jan 31, 2015 at 11:09
  • "Content ID form URL" should works with Path Alias
    – zaporylie
    Commented Jan 31, 2015 at 11:13

1 Answer 1

0

You don't want to make a new node - just to show field value on separate page. Use Views module to accomplish that.

  1. Create new View based on Content with Page display (path node/%/test_field).
  2. Set Contextual Filter to Node NID (and make it global with "All display" option). Provide default value: Content ID from URL.
  3. Choose field you want but remember to set "This page (override)" option.
  4. Create as many page displays as you want with new path (based on the same rule - node/%/some_name) and select another field (under Fields)

That is how it should looks like: enter image description here

[EDIT] Install Sub-pathauto module for second level path aliases.

3
  • Thank you, this does work, but only for node/%/path format. For vanity urls I learned I needed the Views Path Arguments module.
    – inkovic
    Commented Jan 31, 2015 at 12:29
  • It works as I wrote but you need one more module. Instead of Views Path Arguments try Sub-pathauto. It is really easy to use and works not only with views.
    – zaporylie
    Commented Jan 31, 2015 at 16:39
  • Oh, awesome. Thanks, that's a way more elegant solution.
    – inkovic
    Commented Jan 31, 2015 at 20:23

Your Answer

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

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