Add "orange" fragment administration toolbar
When adding a new custom fragment you may notice that you followed the define fragments instructions but when trying to setup a fragment layout you are missing the "orange" fragment administration toolbar. You may find that you want to lock down your page permissions but without this toolbar you aren't receiving the links necessary to set your permissions.
Below are the instructions to add the tool bar:
Step 1: Export your fragment-layout
- Login as the Portal Administrator and go to the Portal Administration Tools portlet
- Click on the "Import, Export, and Delete Entities" link
- Click on the "Export" button to export the fragment-layout to an xml file
- From the drop-down menu, select "Fragment Layout" and write the id of your fragment in the input field and click on the "Export" button. (see image below)
Step 2: Edit the fragment layout
- Open your exported file for editing (ex., faculty-lo.fragment-layout.xml)
Add the following code near the top of your file, HOWEVER, you will need to change the node id (ID="n3") to a number that does not already exist in your database (ex, ID="n30").
<folder ID="s2" hidden="true" immutable="true" name="Header folder" type="header" unremovable="true"> <channel fname="fragment-admin-exit" unremovable="false" hidden="false" immutable="false" ID="n3" /> </folder>
Â
Â
As a result your file should look like this....
<?xml version="1.0" encoding="UTF-8"?> <layout xmlns:dlm="http://www.uportal.org/layout/dlm" script="classpath://org/jasig/portal/io/import-layout_v3-2.crn" username="faculty-lo"> <folder ID="s1" hidden="false" immutable="false" name="Root folder" type="root" unremovable="true"> <folder ID="s2" hidden="true" immutable="true" name="Header folder" type="header" unremovable="true"> <channel fname="fragment-admin-exit" unremovable="false" hidden="false" immutable="false" ID="n30"/> </folder> <folder ID="s3" hidden="false" immutable="false" name="Footer folder" type="footer" unremovable="false"/> ... </folder> </folder> </layout>
Step 3: Import the fragment-layout file
Import your revised fragment using the data-import toolÂ
ant data-import -Dfile=/path/to/your/faculty-lo.fragment-layout.xml
Step 4: Rebuild uPortal
ant clean deploy-war
Step 5: Restart Tomcat
- Restart your tomcat server
Â
Add Feedback content box here.....