Info | ||
---|---|---|
| ||
Contribution written by Julien Gribonvald |
This feature provides the possibility to push a sidebar content from DLM fragments definitions.
...
This works like fragment definitions, you define the folders that will represents a group of elements and inside your organized channels. Like DLM, all sidebar elements will be merged and shown into the sidebar, but all folders with the same name will be merged into the same folder to avoid several group with same name, and the precedence will be used to order the groups of contents and the contents.
...
Step 1: Define Sidebar structure
To define, you only need to specify the folder type as ''sidebar'', the folder name will be used as id to show the name of the group's content.
Code Block |
---|
<?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="sidebar-lo"> <folder ID="s1" hidden="false" immutable="false" name="Root folder" type="root" unremovable="true"> ... <folder ID="s5" ... name="A_GROUP_NAME" type="sidebar"> <folder ID="s6" ... name="Column" type="sidebar"> <channel ID="n7" fname="A_FNAME" ... /> ... <channel ID="n10" fname="A_FNAME" .../> </folder> </folder> ... </folder> </layout> |
...
Step 2: Define the content
Example on how to define a sidebar content :
...
And this render a such sidebar content :
Step 3: Edit the template
For this example we edited the universality.xsl file, and edited the template ''content.sidebar.block'' :
Code Block |
---|
<xsl:template name="content.sidebar.block"> <!-- Links from DLM content whithwith type='sidebar' --> <xsl:call-template name="dlm.sidebar.links"/> <!-- Links from DLM content whithwith type='sidebar' --> </xsl:template> |
Step 4: Rebuild/Redeploy uPortal
For the changes to occur, you will need to rebuild/redeploy uportal using the command below:
Code Block |
---|
ant clean deploy-war |
Step 5: Restart tomcat
After the rebuilding/redeploying uPortal, restart your tomcat server
Info | ||||
---|---|---|---|---|
| ||||
...