Skip to Content

Custom WPC Container for Desktop AND Portal on Device

Hi Experts


I have a custom container for displaying content through WPC (Web Page Composer). It's a very basic container with 3 columns in a row. The code is below.

Now I have to display the same content in Portal On Device. Of course here the Content get's also displayed in three columns, but as smartphones don't have large screens only the first column is visible and all the rest gets cut off.

It would be better if I could show the three columns of my container one below the other. That means make it 1 column with 3 rows instead of 3 columns in 1 row.

The basic idea is to have an if condition to find out what device the user is on in my overview.jsp file of the container. And change the layout according to that if condition.

Is this possible?

  • Can I find out in the container JSP if the user has a small display / portal on device / device group and if yes use a different template?
  • Portal does have the information (device group) somewhere. Can I access this information from my custom jsp?
  • If it is possible, how would I have to implement this device detection in my WPC container.

Any input on how to achieve this is very welcome.

Thanks and best regards

Christophe

This is the actual code of the overwiew.jsp

<%@ taglib uri="prt:taglib:com.sap.portal.reserved.layout.TagLibLayout" prefix="lyt"%>

<lyt:template>

<table id="GridLayout1" width="100%" cellSpacing="15">

<tr>

<td width="50%" valign="top">

<lyt:container id="left" wrappingMethod="none" />

</td>

<td width="25%" valign="top">

<lyt:container id="middle" wrappingMethod="none" />

</td>

<td width="25%" valign="top">

<lyt:container id="right" wrappingMethod="none" />

</td>

</tr>

</table>

</lyt:template>

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Dec 05, 2014 at 11:13 AM

    Christoph, Im probably missing something, but cant you use the available JS stuff on this? Im not sure if there are any possibilities to achieve this with a more portal specific approach...

    regards

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 09, 2014 at 01:09 PM

    Hi Christoph,

    I would direct mobile users to a different page containing the same content but with 1 column layout.

    I know it is double maintenance but the other way is to start touching WPC CSS Files and I suggest not to start with it as it might be unstable and error prone.

    BR,

    Saar

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.