简体   繁体   中英

How to add the user name in drupal views path?

I created a view to dispalay a page with all my articles but I can not make it to dispaly the user name in the path - mysite.com/articles/username with a normal menu entry in the main menu. In the navigation the blog module created a My Blog link with the path mysite.com/blogs/username.My blog is not in the views list.

How can I creat a link My Articles with path similar to My Blog?

In your View that outputs the articles have you tried clicking on Advanceds > Relationships and adding "Content: Author". You might be able to do something with the path then.

Alternatively, you should have Pathauto installed. If not, install it and go here: /admin/config/search/path/patterns then populate the article field to include the author name (something like [node:author]).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM