- Basic Linux tutorials for beginner
- Linux basic concepts, installation and troubleshooting
- Linux administration
- Linux commands
- Linux network tutorials
- Linux security tutorials
- Linux software configuration
- Linux desktop tutorials for beginner
- Collection of Linux tips
- Windows basic tutorials
- Introduction to windows
- Windows pre-installation
- Windows Installation
- Windows xp desktop
- Log on for the first time
- Windows XP control panel
- Managing Folders in Windows XP
- Outlook Express Setup
- How to import address book in Outlook Express
- Import Ms Exchange inbox file(.pst) into Ms Outlook 2003
- Import Outlook Express email messages into Ms Outlook 2003
- How to mount and unmount usb drive (thumb drive) in Windows
- House keeping - Keep your Windows clean and tidy
- Windows basic tutorials
Drupal 7: Displaying authored content in user profile using Views
Submitted by jinlusuh on Wed, 10/08/2014 - 21:58
There are several ways on how to allow visitors to view all post by a certain user in Drupal 7. Here is a step by step guide on how to display authored content in user profile using Views module.
Step 1 - Allow visitors to view user profile. Go to "People -> Permission" (admin/people - PERMISSIONS tab). Scroll down to User section and select View user profiles for ANONYMOUS USER.
Step 2 - Assuming that you already had Views module with associated modules installed, now create a new view: Structure -> Views -> Add new view (url:admin/structure/views/add).
Step 3 - Fill in "View name" and description. Show Content (default select from dropdown list) of type and choose your preferred content type from dropdown list. Untick "Create a page" instead tick "Create a block". Enter "Block title" and choose "Display format" from dropdown list. You can change this to your like later if you want. Edit anything that you want and click "Continue & Edit" button.
Step 4 - FIELDS - Add your content fields, title, picture and whatever you want.
Step 5 - FILTER CRITERIA - Add filter Type, Publish and however you want.
Step 6 - BLOCK SETTINGS - Access: Permission | View publish content.
Step 7 - Click Advanced link (column on the right) and add CONTEXTUAL FILTERS. Choose Content: Author uid. Apply. On "When the filter value is NOT available", choose Provide default value and in "Type" dropdown list, choose User ID from URL. Click Apply.
Step 8 - Now go to Structure -> Block (url: admin/structure/block) and scroll down to "Disabled" block. Locate the block that you just created (the block name start with View: Name). Click configure and on "Show block on specific pages", choose "Only the listed pages". In the text box type users/* and Save block. Place it in the "Content" region or whatever region you want. Save block.
Now, to verify, open a new tab in your browser and type your-website/users/username in the url.