Re: Template problem
Drazen Kozic <[email protected]> Mon, 02 Jun 2014 08:57:39 +0200
| Newsgroups | gmane.comp.jakarta.jetspeed.user |
|---|---|
| Message-ID | <[email protected]> |
Hi David, Thanks for your help. I have change override.properties and template.tpsml as you instructed me. Now, we can see our template in action. It works! But (there is always but :-) ), in documentation (http://portals.apache.org/jetspeed-2/deployguide/guide-page-templates.html) is stated that all examples ware tested on Classic (Portal) pipeline. But in reality, Demo Classic installation does not have any *.tpsml file. Demo JetUI installation have several examples of them. Should we go to JetUI entirely? Thanks On 31.05.2014 20:13 PM, David S Taylor wrote: > Drazen, > > Once you setup ajax customization mode, your navigations will go away. > (Assuming you are logged in as admin). Lets fix that by adding a Space > Navigator to your template. Paste this code fragment into your > template.tpsml just above the fragment with an id of /example-left/and > save the file: > <fragment id="jsSpaceNavigator" type="portlet" name="j2-admin::SpaceNavigator" decorator='clear'> > <property name="y" value="300"></property> > <property name="x" value="20"></property> > <property name="state" value="detach"></property> > </fragment> > > Refresh the page. You should now see a Space Navigator in the top area > of your page. An interesting aspect of this fragment is that it is > detached and placed at a specific coordinate on the page. Detached > portlets are placed in a different plane than flow-driven layout > portlets, whose positions are relative to their placement in the PSML > definition. To read more about detached portlets see the JetUI > documentation > <http://portals.apache.org/jetspeed-2/deployguide/guide-jetui.html>. > > There is another problem. We cannot navigate within the folder. In > order to do that we need a Page Navigator. Lets add one to the > template, so that all the pages in this folder can use it. Paste in > the code snipped below immediately after the fragment end tag of the > fragment with an id of *example-locale*: > > <fragment id="jsPageNavigator" type="portlet" name="j2-admin::PageNavigator"> > <property name="row" value="1"></property> > <property name="column" value="0"></property> > <property name="state" value="normal"></property> > <property name="tool" value="true"></property> > </fragment> > > Refresh the page. You should now see a page navigator portlet > immediately below the Locale Selector portlet on the left hand side of > the page. As you navigate to other pages in this folder, such as the > /My Account/ page, you should always still see our four portlets from > the template (Locale Selector, Page Navigator, Forgotten Password, and > the Space Navigator). > > You can also add the Toolbox portlet to your Template PSML. For > example, add it just below the Forgotten Password portlet on the > right-hand side: > > <fragment id="jsToolbox" type="portlet" > name="j2-admin::JetspeedToolbox"> > <property name="row" value="1"></property> > <property name="column" value="0"></property> > <property name="state" value="normal"></property> > <property name="tool" value="true"></property> > </fragment> > > > > On Sat, May 31, 2014 at 10:25 AM, David S Taylor > <[email protected] <mailto:[email protected]>> wrote: > > > Actually, the name of file is template.tpsml. It was typo. > > ah.... thought it was too easy of a support case :) > > I reproduced the problem. I don't have a solution, yet. > > Just to verify my finding, could you try modifying this setting in > your jetspeed/WEB-INF/conf/override.properties and see if this > fixes the layout issue: > > jetui.customization.method = ajax > > Enabling ajax customization has a side-effect. It allows you to > drag and drop portlets around for quick customization. Anyway, > templates should work in either customization method, so I've > logged a bug you can track here: > > https://issues.apache.org/jira/browse/JS2-1297 > > Also, I've created an issue for the other problem you reported to me: > > https://issues.apache.org/jira/browse/JS2-1296 > > > > > > -- > David S Taylor > CEO, Bluesunrise > 707 529-9194 <tel:707%20529-9194> > [email protected] <mailto:[email protected]> > > > > On Sat, May 31, 2014 at 7:29 AM, Drazen Kozic <[email protected] > <mailto:[email protected]>> wrote: > > Hi, > > Thanks for response. Actually, the name of file is > template.tpsml. It was typo. The template is applied, but not > entirely. We know that because when we change column sizes in > template from > > <property name="sizes" value="20%,60%,20%"> > > to > > <property name="sizes" value="30%,40%,30%"> > > the screen changes (and generated HTML also, of course). But left column and right column are not shown. > > On 30.05.2014 20:50, David S Taylor wrote: >> Looks like you have a template PSML page (TPSML) with a PSML extension. >> Files with .psml extensions are considered concrete pages, not templates. >> >> See: >> http://portals.apache.org/jetspeed-2/devguide/guide-psml.html#Page_Template >> >> Are you trying to use the template feature? If yes, then you must rename >> your page to template.tpsml - note the .tpsml extension >> >> >> On Fri, May 30, 2014 at 2:09 AM, Drazen Kozic<[email protected]> <mailto:[email protected]> wrote: >> >>> Hi, >>> >>> we are using Jetspeed 2.2.2 with classic pipeline. In pages root folder we >>> have file template.psml with following content: >>> >>> <?xml version="1.0" encoding="UTF-8"?> >>> <page-template id="definition" xmlns="http://portals.apache.org/jetspeed" <http://portals.apache.org/jetspeed> >>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <http://www.w3.org/2001/XMLSchema-instance> >>> xsi:schemaLocation="http://portals.apache.org/jetspeed >>> http://portals.apache.org/jetspeed-2/2.2/schemas/tpsml.xsd" <http://portals.apache.org/jetspeedhttp://portals.apache.org/jetspeed-2/2.2/schemas/tpsml.xsd>> >>> >>> <title>TEMPLATE</title> >>> <fragment id="template" type="layout" name="jetspeed-layouts:: >>> VelocityThreeColumns"> >>> <property name="sizes" value="20%,60%,20%"></property> >>> >>> <fragment id="jstbLeft" type="layout" name="jetspeed-layouts:: >>> VelocityOneColumn"> >>> <property name="row" value="0"></property> >>> <property name="column" value="0"></property> >>> >>> <fragment id="menu-left-1-1" type="portlet" >>> name="scb-pa::left"> >>> <property name="row" value="0" /> >>> <property name="column" value="0" /> >>> </fragment> >>> </fragment> >>> >>> <fragment id="jstbRight" type="layout" name="jetspeed-layouts:: >>> VelocityOneColumn"> >>> <property name="row" value="0"></property> >>> <property name="column" value="2"></property> >>> <fragment id="menu-right-1-1" type="portlet" >>> name="scb-pa::right"> >>> <property name="row" value="0" /> >>> <property name="column" value="0" /> >>> </fragment> >>> </fragment> >>> >>> <page-fragment id="page-template"> >>> <property name="row" value="0" /> >>> <property name="column" value="1" /> >>> </page-fragment> >>> >>> </fragment> >>> </page-template> >>> >>> So, template has three columns: left, middle and right. Left and right >>> columns are prepopulated with portlets and middle column is reserved for >>> page content. Template defines also sizes of columns: 20%,60%,20%. >>> >>> The problem is: left and right column are not shown at all. In HTML source >>> we can see: >>> >>> <div id="js_template_"class="portal-nested-layout portal-nested-layout- >>> ThreeColumns"> >>> >>> >>> >>> <div id="column_template_0" >>> class="portal-layout-column portal-layout-column-ThreeColumns-0" >>> style="float:left; width:20%;"> >>> >>> </div> >>> >>> <div id="column_template_1" >>> class="portal-layout-column portal-layout-column-ThreeColumns-1" >>> style="float:left; width:60%;"> >>> ...actual middle column content >>> </div> >>> >>> <div id="column_template_2" >>> class="portal-layout-column portal-layout-column-ThreeColumns-2" >>> style="float:right; width:19.99%;"> >>> >>> </div> >>> </div> ...rest of page >>> >>> As you can see from snippet, HTML for left and right columns is not >>> generated. >>> >>> Any help is welcome. >>> >>> Thanks >>> >>> >>> >>> >>> > > -- > *Dražen Kozić* > Razvoj softverskih proizvoda > Rukovodilac tima > -------------------------------------- > > *ASW Inženjering d.o.o.* > Takovska 45a > 11000 Beograd, Srbija > Tel: +381 11 2071 400 > Fax: +381 11 2071 409 > E-mail: [email protected] <mailto:[email protected]> > www.asw.eu <http://www.asw.eu/> > --------------------------------------- > > > -- *Drazen Kozić* Razvoj softverskih proizvoda Rukovodilac tima -------------------------------------- *ASW Inženjering d.o.o.* Takovska 45a 11000 Beograd, Srbija Tel: +381 11 2071 400 Fax: +381 11 2071 409 E-mail: [email protected] www.asw.eu <http://www.asw.eu/> ---------------------------------------