Sign in

E-mail *, (xx@domain.com)
Password *

Register | Forgot password

Recent blogs

RSS - Blogs
December 24, 2008
The year has almost ended...
December 9, 2008
5 Spring pitfalls
December 9, 2008
Like A Version
October 22, 2008
New certification process
October 17, 2008
Search quest [3/3] - improvements

All Blogs...


Lacking chemistry

April 14, 2008

Ever tried sticking some page design to GX WebManager? Seems easy enough, doesn't it?

I have taught quite a few students how to do it and they all manage very well. However, they all invariably hit the invisible wall called "page sections".

At first glance, these things are the most handy inventions ever. I mean, the power of a page anywhere on a page! In fact, even at second, third and the rest of the glances they keep up this appearance. Let's face it, you just have to put some of these to good use.

And that's where things go tits up. While creating page sections and assigning them to pages is a piece of cake, getting the @#%^@&^!@ things to actually appear on your homebrew JSP design is hell!

Programmers and page sections are clearly lacking chemistry.


Unless you know The Secret!


And what do you know... I just happen to know this Secret. And since I don't feel like writing a book about it I will just dedicate this blog entry to it.


First things first: create page sections and labels

To get a firm grasp on things we need a good base population. The WM Community Edition ships with a nice set of page sections, as can be seen in the screenshot. There are blocks meant for use in the header, the left and the right side of the page and they are grouped together in the page section hierarchy. Oh, yeah! Be sure to check that the page sections are published! You won't be the first one to fall for that trap.



Three labels have been created: "header", "left" and "right". The labels have been assigned to the respective page sections.

Second: create page parts in WM for use in JSP

For this, you need to go to "Format > Presentation > Page parts". If the option is not available in the menu, try going to "Configure > Web Initiative configuration... > Functionalities" and make sure the "Design" checkbox is selected.


From the select pulldown menu, pick the option "< Create new page part >". Give the new page part the description "myHeaderPageSections" and the same identifier. Assign the presentation "WM Page sections". Under "Additional block settings" select the label "header".


Repeat the process to create page parts "myLeftPageSections" and "myRightPageSections", make sure you assign the correct presentation and select the corresponding label.


Third: make JSP refer to the new page parts

Scan your myPerfectPage.jsp to look for the correct spots to insert page section HTML. For example, put the following line where you want the header blocks to appear:

 

<wm:pagePart label="myHeaderPageSections" />


Do the same for the left and right bits.

Oh, and make sure the myPerfectPage.jsp is used on your testpage ("File > Properties > Design...")!


Fourth: assign page sections to pages

Our journey has almost come to an end. Everything has been prepared:

  • There are published page sections with labels assigned
  • There are page parts that make use of one of the labels
  • The JSP design refers to the page parts.


Now all that remains is to assign page sections to the page! Go to "File > Properties > Assign page sections to page..." and assign a page section.




Preview the page, and presto...

Congratulations! You have mastered The Secret!


Looks like you're back with another one of those block rockin' beats!


Later,



Patrick



markko | 16-04-2008 10:48

Hi Patrick,

Great post, especially for Developers! For people that want even more reading about the Page Sections and Page Parts: take a look at English & Dutch PDFs on the documentation page.

Go to the Documentation Page and search for "Page sections".

Enlighten us on more of those secrets, Patrick!

Cheers,
Mark.


 
francoisp | 22-04-2008 10:01

Hey Patrick,

Also for non-developers a great post, we all want to
know 'the secret'

thanks

Francois


About the Author

Return to all blogs

 

Patrick Atoon

Patrick Atoon has gained nuff respect as one of the most experienced web architects in the GX Webmanager community or even the global hip hop community for that matter.

Read all Patricks blog entries

Other blog entries:

December 9, 2008
Like A Version
August 19, 2008
Stop making sense
August 4, 2008
Namaste!
July 7, 2008
Japanese encore (日本のアンコール)
May 20, 2008
All amped up
May 7, 2008
No soup for you!
April 16, 2008
Live in effect
March 20, 2008
About cars and software
March 17, 2008
Scope, que?!
March 11, 2008
Maven FTW!


Share:

del.icio.us
digg
Technorati
Slashdot
Reddit
YahooMyWeb
NewsVine
ekudos
© 2008 GX creative online development B.V.

Disclaimer

This website (GXdeveloperweb.com) may discuss or contain opinions, (sample) coding, software or other information that does not include GX official interfaces, instructions or guidelines and therefore is not supported by GX. Changes made based on this information are not supported.  GX will not be held liable for any damages caused by using or misusing the information, software, instructions, code or methods suggested on this website, and anyone using these methods does so at his/her own risk. GX offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this website, including any liability resulting from incompatibility between the content of this website and the materials and services offered by GX. By using this website you will not hold, or seek to hold, GX responsible or liable with respect to the content of this website.