This post will help you to configure assets based on user's custom attribute.
Steps are already available in LPS-19681 but in case if you face any difficulty while configuring the same you can follow this post.
Scenario
Filter content based on user's custom attribute. If user A logged in from India then asset publisher to display contents for India. If user B logged in from USA then asset publisher to display content from USA.
Step 1 :
Create custom attribute for user with the type Text and name it as "Location".
Step 2 :
Set "India" to location user custom attribute for user A.
Set "USA" to location user custom attribute for user B.
Step 3:
Now navigate to global scope . From site menu move to global site.
Create vocabulary called "Location" in global scope. Create category "India" & "USA" inside Location vocabulary.
Liferay Categories Screen in Control Panel |
Step 4 :
Create some web content or documents inside site (not global site) in which you want to configure asset publisher .
Categorize few of the contents in "India" category and few of them in "USA" category.
Step : 5
Now place asset publisher on page and click on configuration icon.
Specify "Location" in Displayed assets must match these custom user profile attributes.
Liferay Asset Publisher Configuration |
That's it. Now log in using different account and verify contents.
0 comments:
Post a Comment