In Block view I want to set the link of content with the title name How to Rewrite Results using the Content:Link to Content? Example showing node/8 to john-bartlett(content title name) By using this {{ view_node_1 }} i am getting the node/8 path but i want the title name john-bartlett.
Please provide any solution regarding this
- Try like this <a href="{{ view_node_1 }}">{{ title }}</a> . It will display title with link to content for node/8.Ajay Reddy– Ajay Reddy2018-05-08 05:59:40 +00:00Commented May 8, 2018 at 5:59
- @ajay its giving me the path of node like project_name/node/8. Its working fine but i want to know how to change with title name Please provide solution for this . I am trying for long timeManmeet Khurana– Manmeet Khurana2018-05-08 06:02:24 +00:00Commented May 8, 2018 at 6:02
- Do you want project_name/TITLE of node to redirected to node page? If yes have you added alias for that?Ajay Reddy– Ajay Reddy2018-05-08 06:04:57 +00:00Commented May 8, 2018 at 6:04
- yes i want to add project_name/TiTLE space replaces with dashes in title using content:link to contentManmeet Khurana– Manmeet Khurana2018-05-08 06:07:08 +00:00Commented May 8, 2018 at 6:07
- is I have to set custom url alias every time when added the content ?Manmeet Khurana– Manmeet Khurana2018-05-08 06:08:17 +00:00Commented May 8, 2018 at 6:08
1 Answer
Download Pathauto module. After installing go to http://YOURSITE/admin/config/search/path/patterns and click add patterns like below.
After adding pattern go to http://YOURSITE/admin/config/search/path/update_bulk and select content and check "Regenerate URL aliases for all paths" and click update. After this, ALL your node path alias should be generated with the title of that nodes.
Then in rewrite result's add this line:
<a href="{{ view_node_1 }}">{{ title }}</a> All your links and tags will be on your node titles.
- i Have set the node[node:title] .its showing blank when added the content in specify content type like artists. And install the Pathauto module.Manmeet Khurana– Manmeet Khurana2018-05-08 06:19:37 +00:00Commented May 8, 2018 at 6:19
- Does your node has default title of any other field using as title?Ajay Reddy– Ajay Reddy2018-05-08 06:21:05 +00:00Commented May 8, 2018 at 6:21
- Click on browse available tokens and check for your title in that and replace that with [node:title] if your using another field as title in artists content typeAjay Reddy– Ajay Reddy2018-05-08 06:22:04 +00:00Commented May 8, 2018 at 6:22
- I think i miss this step d8.local/admin/config/search/path/update_bulkManmeet Khurana– Manmeet Khurana2018-05-08 06:22:17 +00:00Commented May 8, 2018 at 6:22
- YOURSITE/admin/config/search/path/update_bulkAjay Reddy– Ajay Reddy2018-05-08 06:23:41 +00:00Commented May 8, 2018 at 6:23

