Web Content enhancements

The new release brings some cool new features for the Web Content portlet (previously known as Journal portlet), here are some of them:

1. Repeatable Structure fields

Sometimes, while creating a Structure, we can't predict how many fields of a certain type a Web Content entry will need. Now, for each row in a Structure, there is a Repeatable check box:



If I check this checkbox, I can add as many "repeatable-field" as I want while creating my Web Content entry, I just need to click on the plus icon:



Here's the template that I created to list all "repeatable-field", to get all the values I just need to call $repeatable-field.getSiblings() and iterate over them:



And here's the result:



2. Print feature

Go to Web Content Display configuration, click on "Enable Print", a printer icon will appear just below the Web Content Display portlet, when you click on the printer icon, a pop-up shows up the content in a printer-friendly version. But before that, the template being used needs something like:

#if ($viewMode == "view")
    Displaying content normally.
#elseif ($viewMode == "print")
    Displaying the content in a printer friendly fashion.
#end

3. Web Content conversion to PDF, ODT, DOC...

We have this feature for a long time for Wiki and Document Library, we extended it so Web Content entries can be also converted to these formats, you just need to enable OpenOffice integration following this steps:

Document Conversion with OpenOffice

Then, go to Web Content Display configuration and enable the "Convert To" checkboxes.

That's it, hope these features can be useful for you!

博客
Great!!! I was expecting this feature since this post http://www.liferay.com/web/guest/community/forums/-/message_boards/message/538584, you can check it again there are other features that would be great to add ("Group" type, set the number of repetitions for repeatable fields), Thanx.
i've been using it recently and it works well! no more title001, title002, title003 ... =)
Hi Bruno. Hi everyone.
I have a problem with Repeatable Structure fields. I follw the instructions in your post but I can't obtain any result. I think that "getSibilings" method doesn't return any element so variable "$field" is empty and for each statement doesn't cycle.

Thanks in advance
Can somebody post the code for accessing the nested repeatable items?
for structure
-----------------
<dynamic-element name='sub_section_title' type='text' repeatable='true'>
<dynamic-element name='sub_section_link_name' type='text' repeatable='true'>
<dynamic-element name='sub_section_link_url' type='text' repeatable='false'> </dynamic-element>
</dynamic-element>
</dynamic-element>


Template code
-----------------------

#foreach ($SubSection in $SectionTitle.sub_section_title.getSiblings())
#if ($SubSection.data != "")
<a href="" onclick="expandMenu('k$velocityCount','key$velocityCount');return false;" id="k$velocityCount">$SubSection.data</a>
<div id="key$velocityCount" style="display:none;" class="sublist">
#foreach ($SubSectionLink in $SubSection.sub_section_link_name.getSiblings())
<a href="$SubSectionLink.sub_section_link_url.data" target="new">- $SubSectionLink.data</a>
#end
</div>
#end
#end
hi.. can anyone tell me where do i find the wcm api?
Is there any way to style / add css to the printer friendly content?
This is a good feature! thanks,
Can we also all any format eg. .doc and let Liferay convert it to .pdf?, so that all documents will in in .pdf format in the Library portlet.
Also, can this be applied to video / audio files also? meaning, user will upload any format (.avi, .wmv etc) and the file will be saved in .swf or .flv by converting in the Library portlet.
Hi,
there seems to be a strange behaviour when adding new rows - they are always added at the top not the bottom.
So when i have text block and want to add new text, they are always at the top.
Can this behaviour be changed ?
How do you change the order of a repeatable field without having to re-enter the data?
Hi,
I'd like to know if problems with repeatable fields are solved.

Thanks
Hi,

The repeatable fields is a great improvement with 5.2.
It allows much more flexibility in web content structure design.

But it still lacks ordering support, to make it more usable.

Are the any plans to work on that functionnality?