S L B 14 年之前 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. 请登录以投票。 以……回复 取消
Bertrand Pinel 14 年之前 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. 请登录以投票。 以……回复 取消 Bruno Farache Bertrand Pinel 14 年之前 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= 请登录以投票。 以……回复 取消
Bruno Farache Bertrand Pinel 14 年之前 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= 请登录以投票。 以……回复 取消
Petros Giakouvakis 14 年之前 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. :-) 请登录以投票。 以……回复 取消 Bruno Farache Petros Giakouvakis 14 年之前 - 编辑过的 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 请登录以投票。 以……回复 取消 dennis monsewicz Bruno Farache 14 年之前 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 请登录以投票。 以……回复 取消 ANNU T T Bruno Farache 14 年之前 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>" 请登录以投票。 以……回复 取消 Bruno Farache Bruno Farache 13 年之前 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 请登录以投票。 以……回复 取消 danny chanyalew Bruno Farache 13 年之前 Hi Bruno, Is the "Webscript" plugin you proposed to create as a repository for sample webcontents available now?thx 请登录以投票。 以……回复 取消
Bruno Farache Petros Giakouvakis 14 年之前 - 编辑过的 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 请登录以投票。 以……回复 取消 dennis monsewicz Bruno Farache 14 年之前 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 请登录以投票。 以……回复 取消 ANNU T T Bruno Farache 14 年之前 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>" 请登录以投票。 以……回复 取消 Bruno Farache Bruno Farache 13 年之前 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 请登录以投票。 以……回复 取消 danny chanyalew Bruno Farache 13 年之前 Hi Bruno, Is the "Webscript" plugin you proposed to create as a repository for sample webcontents available now?thx 请登录以投票。 以……回复 取消
dennis monsewicz Bruno Farache 14 年之前 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 请登录以投票。 以……回复 取消
ANNU T T Bruno Farache 14 年之前 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>" 请登录以投票。 以……回复 取消
Bruno Farache Bruno Farache 13 年之前 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 请登录以投票。 以……回复 取消 danny chanyalew Bruno Farache 13 年之前 Hi Bruno, Is the "Webscript" plugin you proposed to create as a repository for sample webcontents available now?thx 请登录以投票。 以……回复 取消
danny chanyalew Bruno Farache 13 年之前 Hi Bruno, Is the "Webscript" plugin you proposed to create as a repository for sample webcontents available now?thx 请登录以投票。 以……回复 取消
Michael A Ikhane 14 年之前 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 请登录以投票。 以……回复 取消
jeff leitman 14 年之前 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! 请登录以投票。 以……回复 取消 Achmed Tyrannus Albab jeff leitman 13 年之前 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. 请登录以投票。 以……回复 取消 Geoff Garcia Achmed Tyrannus Albab 12 年之前 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. 请登录以投票。 以……回复 取消
Achmed Tyrannus Albab jeff leitman 13 年之前 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. 请登录以投票。 以……回复 取消 Geoff Garcia Achmed Tyrannus Albab 12 年之前 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. 请登录以投票。 以……回复 取消
Geoff Garcia Achmed Tyrannus Albab 12 年之前 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. 请登录以投票。 以……回复 取消
Henry K 13 年之前 On Liferay 6.0.3, these structures and templates do nothing. All that is displayed is "Enterprise Edition FAQ" in the h1 tag. 请登录以投票。 以……回复 取消 Mitesh S Panchal Henry K 13 年之前 did you set property journal.template.velocity.restricted.variables under portal-ext.properties? 请登录以投票。 以……回复 取消 Mitesh S Panchal Mitesh S Panchal 13 年之前 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? 请登录以投票。 以……回复 取消 Lakshminarayana Mummanedi Mitesh S Panchal 13 年之前 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" /> 请登录以投票。 以……回复 取消
Mitesh S Panchal Henry K 13 年之前 did you set property journal.template.velocity.restricted.variables under portal-ext.properties? 请登录以投票。 以……回复 取消 Mitesh S Panchal Mitesh S Panchal 13 年之前 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? 请登录以投票。 以……回复 取消 Lakshminarayana Mummanedi Mitesh S Panchal 13 年之前 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" /> 请登录以投票。 以……回复 取消
Mitesh S Panchal Mitesh S Panchal 13 年之前 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? 请登录以投票。 以……回复 取消 Lakshminarayana Mummanedi Mitesh S Panchal 13 年之前 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" /> 请登录以投票。 以……回复 取消
Lakshminarayana Mummanedi Mitesh S Panchal 13 年之前 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" /> 请登录以投票。 以……回复 取消
DarshanKumar N Bhatia 13 年之前 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 请登录以投票。 以……回复 取消
Rodrick Borg 13 年之前 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. 请登录以投票。 以……回复 取消 Bruno Farache Rodrick Borg 13 年之前 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 请登录以投票。 以……回复 取消 Rodrick Borg Bruno Farache 13 年之前 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. 请登录以投票。 以……回复 取消 Jan Boonen Rodrick Borg 13 年之前 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 请登录以投票。 以……回复 取消 Aaron Daubman Bruno Farache 13 年之前 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! 请登录以投票。 以……回复 取消
Bruno Farache Rodrick Borg 13 年之前 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 请登录以投票。 以……回复 取消 Rodrick Borg Bruno Farache 13 年之前 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. 请登录以投票。 以……回复 取消 Jan Boonen Rodrick Borg 13 年之前 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 请登录以投票。 以……回复 取消 Aaron Daubman Bruno Farache 13 年之前 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! 请登录以投票。 以……回复 取消
Rodrick Borg Bruno Farache 13 年之前 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. 请登录以投票。 以……回复 取消 Jan Boonen Rodrick Borg 13 年之前 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 请登录以投票。 以……回复 取消
Jan Boonen Rodrick Borg 13 年之前 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 请登录以投票。 以……回复 取消
Aaron Daubman Bruno Farache 13 年之前 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! 请登录以投票。 以……回复 取消
Aaron Daubman 13 年之前 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. 请登录以投票。 以……回复 取消 Arun Kumar S Aaron Daubman 13 年之前 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 请登录以投票。 以……回复 取消 Ibrahim Bakhit Arun Kumar S 13 年之前 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 请登录以投票。 以……回复 取消
Arun Kumar S Aaron Daubman 13 年之前 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 请登录以投票。 以……回复 取消 Ibrahim Bakhit Arun Kumar S 13 年之前 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 请登录以投票。 以……回复 取消
Ibrahim Bakhit Arun Kumar S 13 年之前 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 请登录以投票。 以……回复 取消
Richard Knight 12 年之前 - 编辑过的 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. 请登录以投票。 以……回复 取消
KK rajput 12 年之前 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. 请登录以投票。 以……回复 取消
KK rajput 12 年之前 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 请登录以投票。 以……回复 取消 Balazs Pinter KK rajput 12 年之前 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> 请登录以投票。 以……回复 取消
Balazs Pinter KK rajput 12 年之前 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> 请登录以投票。 以……回复 取消
Achmed Tyrannus Albab 12 年之前 Still clueless how to add maxlength via structure and tempalte in 6.0.5. Any help here? 请登录以投票。 以……回复 取消 Sivachandran Nagendran Achmed Tyrannus Albab 11 年之前 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 请登录以投票。 以……回复 取消 Sivachandran Nagendran Sivachandran Nagendran 11 年之前 if any body having the FAQ portlet please i want that code 请登录以投票。 以……回复 取消
Sivachandran Nagendran Achmed Tyrannus Albab 11 年之前 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 请登录以投票。 以……回复 取消 Sivachandran Nagendran Sivachandran Nagendran 11 年之前 if any body having the FAQ portlet please i want that code 请登录以投票。 以……回复 取消
Sivachandran Nagendran Sivachandran Nagendran 11 年之前 if any body having the FAQ portlet please i want that code 请登录以投票。 以……回复 取消