Changing portal page layout depending on the user - portlet

Is it possible to change the portal page layout depending on the user on WebSphere portal? For example, I have 2 portlets A and B. For user 1, I want portlet A to appear above portlet B and for user 2, I want the reverse, ie, portlet B should appear above portlet A. Is this possible?

It maybe easiest to use two different pages. One will have your layout for user 1 and the other page for user 2. Then use access control or personalization to direct each user to the intended page. Which option to use will depend on how you decide which users should see which layout.

Related

Wagtail Forms: How to make preset from field so editor can't change anything?

I'm trying to create a form which will always have the same form fields. I'm following the documentation but can't seem to find an answer.
The easiest way is through the Wagtail admin. First choose Lock from the popup menu at the bottom of the page you wish to lock. Then assign the user to a group for which you want to deny the ability to change the locked page. By default the Editors group does not allow changing the lock state of a page. If you can't use that group, then click Settings and then Groups and then choose the a different group that you have created for the user. Under the PAGE PERMISSIONS section add a new page permission and choose the page type that you want to deny the user the ability to change. Make sure Unlock is not chosen and save your page permission. If you set things up this way on your development machine, you'll just have to be sure to do the same thing in production.
I would in that case simple make a django model for it and not use wagtail forms. That way the user can't change it.

Steps for creating a facebook app that will allow our users to add the app as a tab on their page, provide an id and fetch the data from our server

I've had a hard time finding anything like what I'm trying to accomplish, seems as though FB updates their way of doing things every 6 months. The documentation I have found is hard to follow and I'm sure this can't be too hard. Here's what I'm trying to accomplish:
We operate a SaaS (in simple terms:) need to allow the user to provide a Form ID and return them a form via iFrame
Product management wants to be able to provide our customers with an app on Facebook where they would need to only add in their Form ID + Title, don't care about actual authentication with our product, just an ID to fetch.
The app would show up as a tab on their Facebook Page (and/or profile?) with the title of the tab showing what they entered and an iframe with the formId as the parameter to the source.. ie: the contents of that page tab would be a loaded iFrame: <iframe src="http://gotomyserver.com/fetch?FormId=123">
The idea is that our customers customers will see this form loaded up if they click on that tab on the page.
This doesn't seem like it should be overly complicated, however I'm having a lot of trouble finding information / understanding the documentation, or maybe I'm approaching it in the wrong manner?
Thanks
What you're trying to achieve is not possible at least because the same app can't have different titles depending on the page it is shown.
I would recommend you to make web application that serves the forms. Creating app everytime a user wants takes 5 minute. You will just need to insert in page tab url the corresponding address: http://gotomyserver.com/fetch?FormId=123 and set the title. Even your clients can do that by themselves.
Displaying an app to a facebook page takes an url copy/paste.

Is it possible to enforce initial configuration of a page app?

I'm attempting to develop my first Facebook app that is designed to allow clients of our website to sell tickets to their events from their Facebook page as well as from our website. So when the administrator of a Facebook page adds our app as a page tab, I need to be able to find out who they are so I can load the relevant event data. There also needs to be additional include/exclude configurations and various other options, which will affect the behaviour of the app.
So my question is how is this situation best handled? When playing around with a basic sandboxed app, I seem to be able to just add the app directly to a page; there is no prompt for configuration, and I can't see any way of defining custom properties.
Is the 'edit_url' property the only way to achieve this? If so, is there a way of automatically directing the page admin to this link upon initial use?
Decoding the signed request recieved in your page will give you more insight.
From this you can retrieve page admins' UID's.
You'll need to manage the rest on your side...
In order to get the user id the user will have to grant your application basic permissions.
I'm currently doing a somewhat similar app and, just like Lix said, I used the signed_request variable to detect the page where the tab is installed. Then, based on the page's ID, I retrieve the proper content.
To also give your users an admin page, add a Page Tab Edit URL in your app configuration where you can redirect your users to a custom panel where they can edit their app.

User-defined settings for Facebook page tab?

I am developing a Facebook iframe application that requires some configuration for each install, such as long/lat and some third-party API keys. I would rather not have to create a new app for each implementation.
Is there any way to allow the user (page owner) to define these settings? Ideally, I'd like to provide additional settings in the "Edit Settings" dialog on the apps admin page (currently the only setting is "Custom Tab Name").
Thanks!
It is possible, but there is no easy/standard way to do this. I would try the following:
Your backend would need to provide the storage for each tab's settings; these would associate a specific tab with a specific page.
In your application's tab iframe add a link that only shows if the user viewing the tab is the user who is associated with the tab. You can do this by looking for the page value in the signed_request and making sure that the user is an admin.
When the user clicks that link, pop up the dialog to let them feed in the custom settings and save that on the server after performing the relevant validation.
On subsequent loads of the tab, look up and use the saved settings appropriately on your server.
You'll need to do some handling for situations where the page settings haven't yet been created, but that SHOULD do what you want.

Do I need to create a new Facebook app for each app tab on a page?

I recently made an app so i could have an iframe tab on my page. i want to add another tab with an iframe. Can this be done with the same app?
Can i determine which tab a request came from? Its going to be different content under each tab.
I want to keep it the same app so users will not have to grant permissions for a second app.
No, you can only define one tab per app. You can configure that tab to display different content for different pages, but you cannot install more than one tab to a page using the same app. You'll have to create multiple apps, but you should be able to point them at the same codebase and determine which app is requesting content to serve the proper tab.
Regarding permissions, I'd work it so that you don't do any authentication from the tab itself but instead you link them to the same installation endpoint.