Managing portal pages

In this recipe, we will discuss how to create and manage new pages in the portal. First, we will add a new user membership for editing the financials portal, and then we will see how to create new pages and how to modify all the options available in the GUI.

Getting ready

In order to manage pages, user must be authenticated in the portal with one of the following roles: Manager or Administrator. For this recipe, we will use John as the Manager of the financials portal.

First, we need to add the access permission to all the members of the administrators group, because although John is a member of the group, he is not a manager for the financials portal.

  1. Log in using the root user.
  2. Click on Site | Edit Portal's Config | Permission Setting | Edit Permission Setting.
  3. Click on the Add Permission button.
  4. In the group panel, select Platform | Administrators.
  5. In the membership panel, select member.
  6. Click on the Save button.

Now John can visit the new financials portal, but he cannot modify anything in the portal. To solve this problem, we are going to set a different editing permission for the portal:

  1. Click on Edit Permission Setting.
  2. Click on the Select Permission button.
  3. Select Platform | Administrators from the group panel and then select * from the membership panel.
  4. Click on the Save button.

Finally, John can edit the financials portal in the same way as the Root user can.

Getting ready

How to do it...

We want to create a Contact us page where we will put a portlet dedicated to allow users to send e-mails to the company.

  1. Open your browser on the financials home page:http://localhost:8080/portal/financials
  2. Leave your pointer on Site Editor in the toolbar and click on Add New Page.
  3. Now you should see the Page Creation Wizard. Click on the left panel on the green arrow to select the root node for the navigation. Be sure to select the page node /default:
    How to do it...
  4. We will create a new page. Here we need to set properties for the new navigation node, in the same container of the default Home page, so select the same parent node (/default), and then fill in the fields related to the Contact page:
    • Node name: This is the name of the node that contains the page (this is the JCR name of the node).
    • Extended label mode: This allows enabling the i18n engine to translate the page label in different languages. When it is checked, it enables other two fields: Language and Display Name.
    • Language: This allows selecting the specific language for the page label that you want to store in the page node using the related Display Name property. Selecting a new language allows you to insert a new label.
    • Display Name: This is the label displayed for the page in the related locale of the language selected in the previous field.
    • Visible: This sets the page visibility if it is checked; otherwise the page will not be visible.
    • Publication date & time: This schedules when you want to publish the page. When it is checked, it enables two new fields: Start Publication Date and End Publication Date.
    • Start Publication Date: This selects the publication date.
    • End Publication Date: This selects the date for removing the visibility of the page in a specific period.
  5. Notice that for this recipe it is not mandatory to set the publication dates, so now we can create a new page with the field values you saw in the previous screenshots without setting the publication schedule, by deactivating the checkbox Publication date & time.
  6. Click on the Next button and choose a layout template for the page.
  7. Leave the default template and click on the Next button to configure portlets in the page.
  8. Click on the disk icon in the Page Editor to save the new empty page Contact us.
    How to do it...

How it works...

In this example, we have seen how to enable a manager user for your new portal. This is a typical task that you have to accomplish before you start editing your portal, because sometimes you don't want administrators to directly create all the pages of the portal.

Once manager users are ready to work, they can start adding and editing pages in the portal by choosing the parent page and the page properties.

Notice that in the recipe, we have chosen to add a new page node at the same level as the Home page, but remember that you are free to add any child page node on any page defined in the portal. This is done by selecting a different parent page from the left panel in the first step of the Page Creation Wizard.

As you know now, GateIn has a very flexible structure that allows you to define new users and groups that can have different roles in the portal. We will discuss more about permissions in Chapter 5, Securing Portal Contents.

There's more...

We now suppose that you need to change some properties for the new page created in this recipe. We can access some of the details in the following way:

  1. Navigate the portal to the Contact us page using the GUI or using the following URL:http://localhost:8080/portal/financials/contactus
  2. Leave the pointer on Site Editor and then click on Edit Page | View Page Properties:
    There's more...
  3. Here you can only change the Page title. The fields in the preceding screenshot are as follows:
    • Page Id: This is the identifier of the page in the GateIn repository.
    • Owner type: This specifies the type of ownership, which can be either of two types: portal or group. The portal value means that a user who has edit permissions for the portal created the page for a specific portal. The group value means that this is a page created by a user for a specific group; this user has the manager role for the group.
    • Owner Id: This is an identifier for the owner of the page, which could be a portal, a group, or a specific user. If the page is created for a portal, then the value will be the portal name, and so on in the case of a group or a user.
    • Page name: This must be an alphabetical value, and it must be unique in the repository folder.
    • Page title: This changes the HTML title of the current page.
    • Show Max Window: If checked, this allows showing the page at maximum size in the browser.
  4. If you take a look at Permission Setting, you can see that all the permissions are inherited by the portal permissions.
  5. Change the Page title to Contact us and then click on the Save button.

An alternative way to access the page properties is based on using the Page Management portlet, in this way:

  1. Access the portal as an administrator of the financials portal (root).
  2. Leave your pointer on Group | Administration and then click on Page Management.
  3. Fill the Title field with contact value and then click on the search button.
    There's more...
  4. Click on the image that has the name Edit Page when hovered on under the Action column.

Removing a page

Using the Page Management console that we have seen in the previous paragraph you can also remove pages:

  1. Access the portal as an administrator of the financials portal (root).
  2. Leave your pointer on Group | Administration and then click on Page Management.
  3. Search to remove the pages using the Title and Site Name fields and click on the search icon.
  4. Click on the trash icon for each page that you want to remove and then click on the OK button in the JavaScript pop-up box.

See also

  • The Managing portals recipe
  • The Managing registered portlets recipe
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.38.253