Jeffrey Handa 14 Years Ago Hey Bruno,Great write-up! Thanks for sharing this information. Please sign in to reply. Reply as... Cancel
S L B 14 Years Ago Good write up. For what it's worth, we did our FAQ as a Message Board Category, but this would probably run a lot faster. Please sign in to reply. Reply as... Cancel
Bertrand Pinel 14 Years Ago Hi Bruno,Very interesting post, indeed. Could you just elaborate a little more on what is specific to the 5.3 version and what could be done an 5.2.x ?Thanks again. Please sign in to reply. Reply as... Cancel Bruno Farache Bertrand Pinel 14 Years Ago Glad you guys liked it!Bertrand,That's the only restriction that I can think of: if for some reason you need to search for web content fields separately (in my case I needed to filter them by the category field), other than that, scripting 5.2.x is very powerful and you may find workarounds for this specific issue. You should give a try.Remember that in order to reference $serviceLocator from vm scripts you need to remove it from this setting in portal.properties:journal.template.velocity.restricted.variables= Please sign in to reply. Reply as... Cancel
Bruno Farache Bertrand Pinel 14 Years Ago Glad you guys liked it!Bertrand,That's the only restriction that I can think of: if for some reason you need to search for web content fields separately (in my case I needed to filter them by the category field), other than that, scripting 5.2.x is very powerful and you may find workarounds for this specific issue. You should give a try.Remember that in order to reference $serviceLocator from vm scripts you need to remove it from this setting in portal.properties:journal.template.velocity.restricted.variables= Please sign in to reply. Reply as... Cancel
Petros Giakouvakis 14 Years Ago Thanx Bruno. Something to look forward to! Something that is also useful is the ability to add "next and previous" buttons, total number of results... In other words: custom paging based on fields. This seems however more something that should be added as feature to the web content list display instead of adding it to the templates functionality. What is missing there is the ability to select content based on the values of custom fields. A rules engine for more advanced content selection seems a natural step... These indexing of the fields should also definitely be picked by the search. Perhaps also add "searchable" checkbox. By checking the checkbox, this field can be used from the search which would detect all searchable fields and allow to search on these fields. Anyhow: that's my wishlist. :-) Please sign in to reply. Reply as... Cancel Bruno Farache Petros Giakouvakis 14 Years Ago - Edited Petros,The Web Content List allows pagination, I can see a preferences called "Display per page". Paginating entries with VM templates is also easy, the search API allows us to pass start and end parameters, I have here some templates that paginates entries with "next" and "previous" links.I personally prefer using VM templates for displaying entries because I have full control over the look and feel and there is no need to change jsps.Perhaps I didn't understand your last comment... Check for the last screenshot in this blog post, you see the highlighted select box with "keyword"? Isn't it the same thing of the "searchable" checkbox you suggested?These changes were committed today: http://issues.liferay.com/browse/LPS-5376 Please sign in to reply. Reply as... Cancel dennis monsewicz Bruno Farache 14 Years Ago if writing a custom portlet in any other language besides Java w/velocity, what is the best way to piggy back on the instantiated sql class? Say for instance I am creating a custom portlet in PHP Please sign in to reply. Reply as... Cancel ANNU T T Bruno Farache 14 Years Ago Can i do validation of input fields of structures like the below while adding some text in structure.(client side validation)"<root> <dynamic-element name='header' type='text_box'repeatable='false'></dynamic-element></root>" Please sign in to reply. Reply as... Cancel Bruno Farache Bruno Farache 13 Years Ago For 6.0+, use this FAQ-PORTLET.vm instead:http://www.liferay.com/c/document_library/get_file?uuid=ba0bf122-9fe0-492a-8456-528445656b7f&groupId=11325 Please sign in to reply. Reply as... Cancel danny chanyalew Bruno Farache 13 Years Ago Hi Bruno, Is the "Webscript" plugin you proposed to create as a repository for sample webcontents available now?thx Please sign in to reply. Reply as... Cancel
Bruno Farache Petros Giakouvakis 14 Years Ago - Edited Petros,The Web Content List allows pagination, I can see a preferences called "Display per page". Paginating entries with VM templates is also easy, the search API allows us to pass start and end parameters, I have here some templates that paginates entries with "next" and "previous" links.I personally prefer using VM templates for displaying entries because I have full control over the look and feel and there is no need to change jsps.Perhaps I didn't understand your last comment... Check for the last screenshot in this blog post, you see the highlighted select box with "keyword"? Isn't it the same thing of the "searchable" checkbox you suggested?These changes were committed today: http://issues.liferay.com/browse/LPS-5376 Please sign in to reply. Reply as... Cancel dennis monsewicz Bruno Farache 14 Years Ago if writing a custom portlet in any other language besides Java w/velocity, what is the best way to piggy back on the instantiated sql class? Say for instance I am creating a custom portlet in PHP Please sign in to reply. Reply as... Cancel ANNU T T Bruno Farache 14 Years Ago Can i do validation of input fields of structures like the below while adding some text in structure.(client side validation)"<root> <dynamic-element name='header' type='text_box'repeatable='false'></dynamic-element></root>" Please sign in to reply. Reply as... Cancel Bruno Farache Bruno Farache 13 Years Ago For 6.0+, use this FAQ-PORTLET.vm instead:http://www.liferay.com/c/document_library/get_file?uuid=ba0bf122-9fe0-492a-8456-528445656b7f&groupId=11325 Please sign in to reply. Reply as... Cancel danny chanyalew Bruno Farache 13 Years Ago Hi Bruno, Is the "Webscript" plugin you proposed to create as a repository for sample webcontents available now?thx Please sign in to reply. Reply as... Cancel
dennis monsewicz Bruno Farache 14 Years Ago if writing a custom portlet in any other language besides Java w/velocity, what is the best way to piggy back on the instantiated sql class? Say for instance I am creating a custom portlet in PHP Please sign in to reply. Reply as... Cancel
ANNU T T Bruno Farache 14 Years Ago Can i do validation of input fields of structures like the below while adding some text in structure.(client side validation)"<root> <dynamic-element name='header' type='text_box'repeatable='false'></dynamic-element></root>" Please sign in to reply. Reply as... Cancel
Bruno Farache Bruno Farache 13 Years Ago For 6.0+, use this FAQ-PORTLET.vm instead:http://www.liferay.com/c/document_library/get_file?uuid=ba0bf122-9fe0-492a-8456-528445656b7f&groupId=11325 Please sign in to reply. Reply as... Cancel danny chanyalew Bruno Farache 13 Years Ago Hi Bruno, Is the "Webscript" plugin you proposed to create as a repository for sample webcontents available now?thx Please sign in to reply. Reply as... Cancel
danny chanyalew Bruno Farache 13 Years Ago Hi Bruno, Is the "Webscript" plugin you proposed to create as a repository for sample webcontents available now?thx Please sign in to reply. Reply as... Cancel
Michael A Ikhane 14 Years Ago Hi Bruno,Thanks for this post. I am using v5.2 and I want to now how to display a list of web contents the way it appears on the blog aggregator portlet. Where the title and an intro text is displayed, with a link to 'read more'Cheers Please sign in to reply. Reply as... Cancel
jeff leitman 14 Years Ago Great post! Is there an easy way to add validation? it would be fantastic if we could add attributes for validation to the dynamic-element tag, like so:<dynamic-element name="foo" type="text" minLength="10" maxLength="200" />etc.Also, where can I find the descriptor files that these xsd structure files are already validated against?thanks! Please sign in to reply. Reply as... Cancel Achmed Tyrannus Albab jeff leitman 13 Years Ago Hi Leitman did you manage to get to add the attributes? if yes would you mind providing me link to it? im on 5.2.3. Thanks. Please sign in to reply. Reply as... Cancel Geoff Garcia Achmed Tyrannus Albab 12 Years Ago I took a look at his public page and didn't find a link there. The link posted on 12/28/10 doesn't work either for me. Please sign in to reply. Reply as... Cancel
Achmed Tyrannus Albab jeff leitman 13 Years Ago Hi Leitman did you manage to get to add the attributes? if yes would you mind providing me link to it? im on 5.2.3. Thanks. Please sign in to reply. Reply as... Cancel Geoff Garcia Achmed Tyrannus Albab 12 Years Ago I took a look at his public page and didn't find a link there. The link posted on 12/28/10 doesn't work either for me. Please sign in to reply. Reply as... Cancel
Geoff Garcia Achmed Tyrannus Albab 12 Years Ago I took a look at his public page and didn't find a link there. The link posted on 12/28/10 doesn't work either for me. Please sign in to reply. Reply as... Cancel
Henry K 13 Years Ago On Liferay 6.0.3, these structures and templates do nothing. All that is displayed is "Enterprise Edition FAQ" in the h1 tag. Please sign in to reply. Reply as... Cancel Mitesh S Panchal Henry K 13 Years Ago did you set property journal.template.velocity.restricted.variables under portal-ext.properties? Please sign in to reply. Reply as... Cancel Mitesh S Panchal Mitesh S Panchal 13 Years Ago I am trying sample on Liferay 5.2.8 EE, it is not bringing Web Contents. I did some investigation looks like following is not working #set ($clause = $booleanClauseFactoryUtil.create("category", $selectedCategory, "MUST"))here $clause is not initialized. and due to that following statement is not bringing results#set ($articleHits = $journalArticleService.search($companyId, $groupId, $userId, null, null, $clauses, null, -1, -1))<p>$articleHits</p>any suggestion? Please sign in to reply. Reply as... Cancel Lakshminarayana Mummanedi Mitesh S Panchal 13 Years Ago Mitesh, i think you are not getting #booleanClauseFactoryUtil. Can you try to load them from spring-ext.xml as below.<bean id="com.liferay.portal.kernel.search.BooleanClauseFactory" class="com.liferay.portal.search.generic.BooleanClauseFactoryImpl" /> Please sign in to reply. Reply as... Cancel
Mitesh S Panchal Henry K 13 Years Ago did you set property journal.template.velocity.restricted.variables under portal-ext.properties? Please sign in to reply. Reply as... Cancel Mitesh S Panchal Mitesh S Panchal 13 Years Ago I am trying sample on Liferay 5.2.8 EE, it is not bringing Web Contents. I did some investigation looks like following is not working #set ($clause = $booleanClauseFactoryUtil.create("category", $selectedCategory, "MUST"))here $clause is not initialized. and due to that following statement is not bringing results#set ($articleHits = $journalArticleService.search($companyId, $groupId, $userId, null, null, $clauses, null, -1, -1))<p>$articleHits</p>any suggestion? Please sign in to reply. Reply as... Cancel Lakshminarayana Mummanedi Mitesh S Panchal 13 Years Ago Mitesh, i think you are not getting #booleanClauseFactoryUtil. Can you try to load them from spring-ext.xml as below.<bean id="com.liferay.portal.kernel.search.BooleanClauseFactory" class="com.liferay.portal.search.generic.BooleanClauseFactoryImpl" /> Please sign in to reply. Reply as... Cancel
Mitesh S Panchal Mitesh S Panchal 13 Years Ago I am trying sample on Liferay 5.2.8 EE, it is not bringing Web Contents. I did some investigation looks like following is not working #set ($clause = $booleanClauseFactoryUtil.create("category", $selectedCategory, "MUST"))here $clause is not initialized. and due to that following statement is not bringing results#set ($articleHits = $journalArticleService.search($companyId, $groupId, $userId, null, null, $clauses, null, -1, -1))<p>$articleHits</p>any suggestion? Please sign in to reply. Reply as... Cancel Lakshminarayana Mummanedi Mitesh S Panchal 13 Years Ago Mitesh, i think you are not getting #booleanClauseFactoryUtil. Can you try to load them from spring-ext.xml as below.<bean id="com.liferay.portal.kernel.search.BooleanClauseFactory" class="com.liferay.portal.search.generic.BooleanClauseFactoryImpl" /> Please sign in to reply. Reply as... Cancel
Lakshminarayana Mummanedi Mitesh S Panchal 13 Years Ago Mitesh, i think you are not getting #booleanClauseFactoryUtil. Can you try to load them from spring-ext.xml as below.<bean id="com.liferay.portal.kernel.search.BooleanClauseFactory" class="com.liferay.portal.search.generic.BooleanClauseFactoryImpl" /> Please sign in to reply. Reply as... Cancel
DarshanKumar N Bhatia 13 Years Ago Hi Bruno,Great Article to reduce effort/time to create a CRUD portlet using Web Content+structure+template.Where I get complete steps for Liferay 6.03 ,also I need to know can we manage pdf,doc,or xml conversion using this concept.ThanksMr.Bhatia Please sign in to reply. Reply as... Cancel
Rodrick Borg 13 Years Ago Can someone please provide the link for the structures and templates since the link provided here is not working. Also I have the same problem as Henry K with the latest Liferay version (6.0.5) and only the header is being displayed. Please sign in to reply. Reply as... Cancel Bruno Farache Rodrick Borg 13 Years Ago See my comment above, it has the correct link.http://www.liferay.com/c/document_library/get_file?uuid=ba0bf122-9fe0-492a-8456-528445656b7f&groupId=11325 Please sign in to reply. Reply as... Cancel Rodrick Borg Bruno Farache 13 Years Ago Hi thanks for the quick reply. I am using the given VM but only the title "Enterprise Edition FAQ" is getting displayed even though I have 2 web contents assigned this template. I think that I am not linking the web contents entries with the template correctly. Can you please specify how that is done. Please sign in to reply. Reply as... Cancel Jan Boonen Rodrick Borg 13 Years Ago Hi Rodrick,I had the same issue and solved it as follows (using Liferay 6.0.5):1. look up the structureId of the structure2. put that in the macro where it says #set ($structure = $journalStructureService.getStructure($groupId, "FAQ")) > replace "FAQ" with your structureIdHope that works for you as well.Cheers,Jan Please sign in to reply. Reply as... Cancel Aaron Daubman Bruno Farache 13 Years Ago I am getting the following error when trying to access this link - is there an updated/current link?"""ForbiddenYou do not have permission to access the requested resource. http://www.liferay.com/c/document_library/get_file?uuid=ba0bf122-9fe0-492a-8456-528445656b7f&groupId=11325"""Thanks! Please sign in to reply. Reply as... Cancel
Bruno Farache Rodrick Borg 13 Years Ago See my comment above, it has the correct link.http://www.liferay.com/c/document_library/get_file?uuid=ba0bf122-9fe0-492a-8456-528445656b7f&groupId=11325 Please sign in to reply. Reply as... Cancel Rodrick Borg Bruno Farache 13 Years Ago Hi thanks for the quick reply. I am using the given VM but only the title "Enterprise Edition FAQ" is getting displayed even though I have 2 web contents assigned this template. I think that I am not linking the web contents entries with the template correctly. Can you please specify how that is done. Please sign in to reply. Reply as... Cancel Jan Boonen Rodrick Borg 13 Years Ago Hi Rodrick,I had the same issue and solved it as follows (using Liferay 6.0.5):1. look up the structureId of the structure2. put that in the macro where it says #set ($structure = $journalStructureService.getStructure($groupId, "FAQ")) > replace "FAQ" with your structureIdHope that works for you as well.Cheers,Jan Please sign in to reply. Reply as... Cancel Aaron Daubman Bruno Farache 13 Years Ago I am getting the following error when trying to access this link - is there an updated/current link?"""ForbiddenYou do not have permission to access the requested resource. http://www.liferay.com/c/document_library/get_file?uuid=ba0bf122-9fe0-492a-8456-528445656b7f&groupId=11325"""Thanks! Please sign in to reply. Reply as... Cancel
Rodrick Borg Bruno Farache 13 Years Ago Hi thanks for the quick reply. I am using the given VM but only the title "Enterprise Edition FAQ" is getting displayed even though I have 2 web contents assigned this template. I think that I am not linking the web contents entries with the template correctly. Can you please specify how that is done. Please sign in to reply. Reply as... Cancel Jan Boonen Rodrick Borg 13 Years Ago Hi Rodrick,I had the same issue and solved it as follows (using Liferay 6.0.5):1. look up the structureId of the structure2. put that in the macro where it says #set ($structure = $journalStructureService.getStructure($groupId, "FAQ")) > replace "FAQ" with your structureIdHope that works for you as well.Cheers,Jan Please sign in to reply. Reply as... Cancel
Jan Boonen Rodrick Borg 13 Years Ago Hi Rodrick,I had the same issue and solved it as follows (using Liferay 6.0.5):1. look up the structureId of the structure2. put that in the macro where it says #set ($structure = $journalStructureService.getStructure($groupId, "FAQ")) > replace "FAQ" with your structureIdHope that works for you as well.Cheers,Jan Please sign in to reply. Reply as... Cancel
Aaron Daubman Bruno Farache 13 Years Ago I am getting the following error when trying to access this link - is there an updated/current link?"""ForbiddenYou do not have permission to access the requested resource. http://www.liferay.com/c/document_library/get_file?uuid=ba0bf122-9fe0-492a-8456-528445656b7f&groupId=11325"""Thanks! Please sign in to reply. Reply as... Cancel
Aaron Daubman 13 Years Ago Unfortunately, the link from "You can download all templates and structures used in this example here." generates the following error:"""Not FoundThe requested resource was not found. http://www.liferay.com/c/document_library/get_file?p_l_id=745616&folderId=4090923&name=DLFE-7602.zip"""Please update the links and permissions as this could be a very useful post. Please sign in to reply. Reply as... Cancel Arun Kumar S Aaron Daubman 13 Years Ago I am also getting the following error while downloading the attachment.Not FoundThe requested resource was not found.http://www.liferay.com/c/document_library/get_file?p_l_id=745616&folderId=4090923&name=DLFE-7602.zip Please sign in to reply. Reply as... Cancel Ibrahim Bakhit Arun Kumar S 13 Years Ago Arun/AaronYou can get the document by going to Bruno's public page, document link at top (next to profile, etc) and you will find it the zip file there.Here is a link that might work as wellhttp://www.liferay.com/web/bruno.farache/documents?p_p_lifecycle=0&p_p_id=20&p_p_col_count=2&p_p_col_id=column-2&p_p_state=maximized&_20_struts_action=%2Fdocument_library%2Fview&p_p_mode=view&_20_folderId=4090923Ibrahim Please sign in to reply. Reply as... Cancel
Arun Kumar S Aaron Daubman 13 Years Ago I am also getting the following error while downloading the attachment.Not FoundThe requested resource was not found.http://www.liferay.com/c/document_library/get_file?p_l_id=745616&folderId=4090923&name=DLFE-7602.zip Please sign in to reply. Reply as... Cancel Ibrahim Bakhit Arun Kumar S 13 Years Ago Arun/AaronYou can get the document by going to Bruno's public page, document link at top (next to profile, etc) and you will find it the zip file there.Here is a link that might work as wellhttp://www.liferay.com/web/bruno.farache/documents?p_p_lifecycle=0&p_p_id=20&p_p_col_count=2&p_p_col_id=column-2&p_p_state=maximized&_20_struts_action=%2Fdocument_library%2Fview&p_p_mode=view&_20_folderId=4090923Ibrahim Please sign in to reply. Reply as... Cancel
Ibrahim Bakhit Arun Kumar S 13 Years Ago Arun/AaronYou can get the document by going to Bruno's public page, document link at top (next to profile, etc) and you will find it the zip file there.Here is a link that might work as wellhttp://www.liferay.com/web/bruno.farache/documents?p_p_lifecycle=0&p_p_id=20&p_p_col_count=2&p_p_col_id=column-2&p_p_state=maximized&_20_struts_action=%2Fdocument_library%2Fview&p_p_mode=view&_20_folderId=4090923Ibrahim Please sign in to reply. Reply as... Cancel
Richard Knight 12 Years Ago - Edited Like many windows applications having an embedded FileBrowser to pick a file to use in the application, how would you create a custom portlet that uses the existing WCM portlet as a means to create and choose a wcm entry to embed in the custom portlet. Any pointers would be greatly appreciated, since I don't want to recreate the entire functionality of the WCM portlet from scratch. Please sign in to reply. Reply as... Cancel
KK rajput 12 Years Ago Hey Bruno , good article but unfortunately I am not able to make it work 100% some time I am only Q&A and some time only categories and the title "Enterprise Edition FAQ" is getting displayed. What I have done is created 2 structures and 2 templates and added article. In this case I am just getting the title "Enterprise Edition FAQ" with categories. Please sign in to reply. Reply as... Cancel
KK rajput 12 Years Ago Hi Bruno , can you please provide a valid link for For 6.0.5, FAQ-PORTLET.vm since the link you have provide below is not working.http://www.liferay.com/c/document_library/get_file?uuid=ba0bf122-9fe0-492a-8456-528445656b7f&groupId=11325 Please sign in to reply. Reply as... Cancel Balazs Pinter KK rajput 12 Years Ago Hi.I have the same problem as Mitas has. The $clause seems like not a valid object. #set ($clause = $booleanClauseFactoryUtil.create("category", $selectedCategory, "MUST"))here $clause is not initialized. and due to that following statement is not bringing results#set ($articleHits = $journalArticleService.search($companyId, $groupId, $userId, null, null, $clauses, null, -1, -1))<p>$articleHits</p> Please sign in to reply. Reply as... Cancel
Balazs Pinter KK rajput 12 Years Ago Hi.I have the same problem as Mitas has. The $clause seems like not a valid object. #set ($clause = $booleanClauseFactoryUtil.create("category", $selectedCategory, "MUST"))here $clause is not initialized. and due to that following statement is not bringing results#set ($articleHits = $journalArticleService.search($companyId, $groupId, $userId, null, null, $clauses, null, -1, -1))<p>$articleHits</p> Please sign in to reply. Reply as... Cancel
Achmed Tyrannus Albab 12 Years Ago Still clueless how to add maxlength via structure and tempalte in 6.0.5. Any help here? Please sign in to reply. Reply as... Cancel Sivachandran Nagendran Achmed Tyrannus Albab 11 Years Ago Hi I am Fresher in liferay So i want to know about velocity script using structure format please If you have any tutorials please send for this mail idsivachandran@formativesolutions.co.in Please sign in to reply. Reply as... Cancel Sivachandran Nagendran Sivachandran Nagendran 11 Years Ago if any body having the FAQ portlet please i want that code Please sign in to reply. Reply as... Cancel
Sivachandran Nagendran Achmed Tyrannus Albab 11 Years Ago Hi I am Fresher in liferay So i want to know about velocity script using structure format please If you have any tutorials please send for this mail idsivachandran@formativesolutions.co.in Please sign in to reply. Reply as... Cancel Sivachandran Nagendran Sivachandran Nagendran 11 Years Ago if any body having the FAQ portlet please i want that code Please sign in to reply. Reply as... Cancel
Sivachandran Nagendran Sivachandran Nagendran 11 Years Ago if any body having the FAQ portlet please i want that code Please sign in to reply. Reply as... Cancel