Vista Combinata Vista Piatta Vista ad Albero
Discussioni [ Precedente | Successivo ]
toggle
Sidney Gijzen
[SOLVED] is this possible in a layout template?
7 marzo 2011 1.37
Risposta

Sidney Gijzen

Punteggio: New Member

Messaggi: 4

Data di Iscrizione: 4 marzo 2011

Messaggi recenti

Hello,

Liferay newbie here emoticon. I've been exploring and working with the Liferay for a week now. I received a few layout designs from our designer, and since I've been struggling for a day now, I was wondering if the layout below is possible. If so, could you provide with a few pointers on how to tackle this problem?
 1
 2-----------------------------------
 3|                     |           |
 4|                     |           |
 5|                     |           |
 6|                     |           |
 7|                     |           |
 8----------------------|           |
 9|      |              |           |
10|      |              |           |
11|      |              |           |
12|      |              |           |
13|      |              |           |
14|      |              |           |
15-----------------------------------

Thank you in advance!
Olaf Kock
RE: is this possible in a layout template?
5 marzo 2011 9.05
Risposta

Olaf Kock

LIFERAY STAFF

Punteggio: Liferay Legend

Messaggi: 3566

Data di Iscrizione: 23 settembre 2008

Messaggi recenti

The short answer is yes, you can. You have to come up with the HTML div-structure that can do this. AFAIK the graphical editor in Liferay-IDE and DeveloperStudio can't do that, but the underlying HTML is quite simple. You need to embed instructions like
1$processor.processColumn("column-2", "portlet-column-content")
and maybe some classes. If you're working in Liferay IDE or DevStudio: Start with a template as close as possible to what you want and then continue to change this in the HTML source to mimic the structure that you need.
Sidney Gijzen
RE: is this possible in a layout template?
6 marzo 2011 22.51
Risposta

Sidney Gijzen

Punteggio: New Member

Messaggi: 4

Data di Iscrizione: 4 marzo 2011

Messaggi recenti

Olaf,

Thank you for your reply. I was indeed a bit confused by the Liferay-IDE, since it constantly was assuming that the columns were next to eachother instead of "columns in columns".

Another thing I perhaps overlooked; how do you define rows in Liferay layouts? Since I assumed that
1
2$processor.processColumn("column-2", "portlet-column-content")

is only used for columns?
Maarten van Heiningen
RE: is this possible in a layout template?
6 marzo 2011 23.52
Risposta

Maarten van Heiningen

Punteggio: Regular Member

Messaggi: 173

Data di Iscrizione: 5 febbraio 2009

Messaggi recenti

Hi Sidney,

You can easily do this by making a a layout like this:


 1
 2<div class="columns-4" id="main-content" role="main">
 3    <div class="portlet-layout">
 4        <div class="aui-w70 portlet-column portlet-column-first" id="column-left">
 5            <div class="aui-w100 portlet-column portlet-column-first" id="column-1">
 6                $processor.processColumn("column-1", "portlet-column-content portlet-column-content-first")
 7            </div>
 8            <div class="aui-w30 portlet-column portlet-column" id="column-2">
 9                $processor.processColumn("column-2", "portlet-column-content portlet-column-content")
10            </div>
11            <div class="aui-w70 portlet-column portlet-column-first" id="column-3">
12                $processor.processColumn("column-3", "portlet-column-content portlet-column-content")
13            </div>
14        </div>
15        <div class="aui-w30 portlet-column portlet-column-last" id="column-4">
16            $processor.processColumn("column-4", "portlet-column-content portlet-column-content-last")
17        </div>
18    </div>
19</div>
Sidney Gijzen
RE: is this possible in a layout template?
7 marzo 2011 0.29
Risposta

Sidney Gijzen

Punteggio: New Member

Messaggi: 4

Data di Iscrizione: 4 marzo 2011

Messaggi recenti

Hello Maarten,

Thank you for your suggestion!
You pushed me into the right direction, but unfortunately it doesn't do what I was aiming for. It results in the following picture
 1
 2---------------------------------------
 3|                 |   |    |          |
 4|                 |   |    |          |
 5|                 |   |    |          |
 6|                 |   |    |          |
 7|                 |   |    |          |
 8|                 |   |    |          |
 9|                 |   |    |          |
10|                 |   |    |          |
11---------------------------------------


Right now, I modified it into this
 1
 2<div class="ace_layout_3" id="main-content" role="main">
 3    <div class="portlet-layout">
 4        <div class="aui-w70 portlet-column portlet-column-first" id="column-left">
 5            <div class="aui-w100 portlet-column portlet-column-first" id="column-1">
 6                $processor.processColumn("column-1", "portlet-column-content portlet-column-content-first")
 7            </div>
 8            <div class="portlet-layout">
 9                <div class="aui-w100 portlet-column portlet-column" id="column-left-inside">
10                    <div class="aui-w30 portlet-column portlet-column" id="column-2">
11                        $processor.processColumn("column-2", "portlet-column-content portlet-column-content")
12                    </div>
13                    <div class="aui-w70 portlet-column portlet-column-first" id="column-3">
14                        $processor.processColumn("column-3", "portlet-column-content portlet-column-content")
15                    </div>
16                </div>
17            </div>
18        </div>
19        <div class="aui-w30 portlet-column portlet-column-last" id="column-4">
20            $processor.processColumn("column-4", "portlet-column-content portlet-column-content-last")
21        </div>
22    </div>
23
24</div>

It adds in the second row, but it still tries to push columns in between the uppers two ones (like in the sketch).

Am I going into the right direction, when using a second portlet-layout in order to achieve the second row of 30/70 columns?
Olaf Kock
RE: is this possible in a layout template?
7 marzo 2011 0.32
Risposta

Olaf Kock

LIFERAY STAFF

Punteggio: Liferay Legend

Messaggi: 3566

Data di Iscrizione: 23 settembre 2008

Messaggi recenti

Sidney Gijzen:
I assumed that
1
2$processor.processColumn("column-2", "portlet-column-content")

is only used for columns?


"processColumn" is rather a misnomer for processing a "cell" or consecutive area of stacked portlets.
Maarten van Heiningen
RE: is this possible in a layout template?
7 marzo 2011 0.33
Risposta

Maarten van Heiningen

Punteggio: Regular Member

Messaggi: 173

Data di Iscrizione: 5 febbraio 2009

Messaggi recenti

Hi Sidney

You can set the correct width's using css in your theme.

It should be fine then.

Positioning the three columns column-1, column-2 and column-3 by using display: inline-block and maybe a float: left in combination with position relative should work for you.

Maarten
Sidney Gijzen
RE: is this possible in a layout template?
7 marzo 2011 1.36
Risposta

Sidney Gijzen

Punteggio: New Member

Messaggi: 4

Data di Iscrizione: 4 marzo 2011

Messaggi recenti

@Olaf: Thanks for the explanation!

@Maarten: Aha! OK, I will fiddle with the CSS. Thanks!


EDIT: I got the template working. Thanks again to Olaf and Maarten!
Maarten's layout example with his CSS clues worked perfectly!
Oleksandr Kiricheiko
RE: is this possible in a layout template?
29 marzo 2011 5.37
Risposta

Oleksandr Kiricheiko

Punteggio: New Member

Messaggi: 1

Data di Iscrizione: 29 marzo 2011

Messaggi recenti

Can you, please, explain what exactly did you do to make and use your layout?
Write, please, the final code for your layout. It would be very useful for me.
Thanks
pham tung
RE: is this possible in a layout template?
24 gennaio 2013 18.41
Risposta

pham tung

Punteggio: New Member

Messaggi: 2

Data di Iscrizione: 17 gennaio 2013

Messaggi recenti

Can you, please, explain what exactly did you do to make and use your layout?
Write, please, the final code for your layout. It would be very useful for me.
Thanks