Avinash kumar 7 Years Ago Hi All,I am facing the below mentioned issue related to the Search hook. Please provide some solution for thatI have uploaded the excel file containing data in the Document and Media portlet section . And after that I have deployed my search hook which is reading the data from excel and displaying upon search operation performed. The issue I am facing is what ever search result is displayed in the search result page i.e page.jsp , the same data is now displaying in every section of the control panel for eg. Web Content, wiki , sites etc... Please refer the screen shots attached for the issue faced.The solution i am expecting is it should display searched data only in the search result page not any where else like it is displaying in web content , wiki. Please respond .... Its urgent.Thanks in AdvanceAvinashAttachmentAttachment Please sign in to reply. Reply as... Cancel Javeed Chida Avinash kumar 7 Years Ago Hi Avinash. First off, you should post your question on the forums to get a much larger readership. https://web.liferay.com/community/forumsIf you have not done so yet, please read my note below before you do.I don't see any screenshots here. In any case, from what you describe, it might be of more interest to see the specific changes you made to the search hook, down to the detail of what you added to the page.jsp and other related files. This will really help forum users point out your issue. It certainly looks like the change you made is getting applied to the larger markup surrounding the search portlet. Possibilities that come to mind are: using an ID or name that is not unique to the search portlet, broken markup (such as a missing closing tag for a DIV), etc. Hope you figure it out. Please sign in to reply. Reply as... Cancel
Javeed Chida Avinash kumar 7 Years Ago Hi Avinash. First off, you should post your question on the forums to get a much larger readership. https://web.liferay.com/community/forumsIf you have not done so yet, please read my note below before you do.I don't see any screenshots here. In any case, from what you describe, it might be of more interest to see the specific changes you made to the search hook, down to the detail of what you added to the page.jsp and other related files. This will really help forum users point out your issue. It certainly looks like the change you made is getting applied to the larger markup surrounding the search portlet. Possibilities that come to mind are: using an ID or name that is not unique to the search portlet, broken markup (such as a missing closing tag for a DIV), etc. Hope you figure it out. Please sign in to reply. Reply as... Cancel
Armando Ramirez 7 Years Ago Sorry, I'm new in liferay, I can't understand how associate the ADT, content template and hook without structure.How can I show this example? thank you Please sign in to reply. Reply as... Cancel Javeed Chida Armando Ramirez 7 Years Ago Hi Armando. Thanks for the comment. First off, your site would need some sort of content. That content may (or may not) have a specific structure. In my case, the structure is called "Course". I had defined a template for that structure, also called "Course". The hook I refer to was specific to the search portlet. Instead of coding a duplicate front end for each course in the hook's JSP, it made much more sense to simply load the course content (i.e. journal article XML) and then transform the content xml to XHTML using the template associated with the course structure. So the hook code makes a call to JournalArticleLocateServiceUtil.getArticleContent() which takes the template key as one of its parameters.Next, the ADT. The ADT is not used by the hook, rather it is picked as the Display Template from the Display Settings tab of an Asset Publisher portlet. This may not be relevant to your site, but it was for mine. All that course content I was showing through my search portlet also had to be shown for each school using an Asset Publisher portlet instance. So I coded an ADT that could be shared on each School's landing page. All we did was configure the Asset Publisher instance to bring back content having a category that matched the corresponding school name. E.g. Business School.Hope that helps. Please sign in to reply. Reply as... Cancel Armando Ramirez Javeed Chida 7 Years Ago Javeed, thank you for the answer, Do you have the project in github? Please sign in to reply. Reply as... Cancel Armando Ramirez Armando Ramirez 7 Years Ago or you can show the structure? tank you!! Please sign in to reply. Reply as... Cancel Javeed Chida Armando Ramirez 7 Years Ago I'm not sure what you're after here. The structure I used is pretty involved and specific to our business requirements. I pasted the XML for it here, you can paste it into the Source view of a new structure to see what it looks like. <root available-locales="en_US" default-locale="en_US"> <dynamic-element dataType="string" indexType="keyword" localizable="true" name="txtCourseName" readOnly="false" repeatable="false" required="true" showLabel="true" type="text" width="small"> <meta-data locale="en_US"> <entry name="label"> <![CDATA[Course Name]]> </entry> <entry name="predefinedValue"> <![CDATA[]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <dynamic-element dataType="html" fieldNamespace="ddm" indexType="keyword" localizable="true" name="htmlCourseLead" readOnly="false" repeatable="false" required="false" showLabel="true" type="ddm-text-html" width="small"> <dynamic-element dataType="string" indexType="keyword" localizable="true" name="txtTabTitle" readOnly="false" repeatable="true" required="false" showLabel="true" type="text" width="large"> <dynamic-element dataType="string" indexType="keyword" localizable="true" name="txtTabId" readOnly="false" repeatable="false" required="false" showLabel="true" type="text" width="small"> <meta-data locale="en_US"> <entry name="label"> <![CDATA[Tab Identifier]]> </entry> <entry name="predefinedValue"> <![CDATA[]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <dynamic-element dataType="html" fieldNamespace="ddm" indexType="keyword" localizable="true" name="htmlTabContent" readOnly="false" repeatable="false" required="false" showLabel="true" type="ddm-text-html" width="large"> <meta-data locale="en_US"> <entry name="label"> <![CDATA[Course Content]]> </entry> <entry name="predefinedValue"> <![CDATA[]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <meta-data locale="en_US"> <entry name="label"> <![CDATA[Course Tab Title]]> </entry> <entry name="predefinedValue"> <![CDATA[]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <meta-data locale="en_US"> <entry name="label"> <![CDATA[Course Lead Text]]> </entry> <entry name="predefinedValue"> <![CDATA[]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <dynamic-element dataType="string" indexType="keyword" localizable="true" name="txtFeesFundingUrl" readOnly="false" repeatable="false" required="false" showLabel="true" type="text" width="small"> <meta-data locale="en_US"> <entry name="label"> <![CDATA[Fees & Funding URL for this course]]> </entry> <entry name="predefinedValue"> <![CDATA[]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <dynamic-element dataType="boolean" indexType="keyword" localizable="true" name="blnShowFeesFunding" readOnly="false" repeatable="false" required="false" showLabel="true" type="checkbox" width=""> <meta-data locale="en_US"> <entry name="label"> <![CDATA[Show 'Fees & Funding' tab]]> </entry> <entry name="predefinedValue"> <![CDATA[false]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <dynamic-element dataType="boolean" indexType="keyword" localizable="true" name="blnShowHowToApply" readOnly="false" repeatable="false" required="false" showLabel="true" type="checkbox" width=""> <meta-data locale="en_US"> <entry name="label"> <![CDATA[Show 'How to Apply' Tab]]> </entry> <entry name="predefinedValue"> <![CDATA[false]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <dynamic-element dataType="string" indexType="keyword" localizable="true" name="txtNqfLevel" readOnly="false" repeatable="false" required="false" showLabel="true" type="text" width="small"> <meta-data locale="en_US"> <entry name="label"> <![CDATA[NQF Level]]> </entry> <entry name="predefinedValue"> <![CDATA[]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <dynamic-element dataType="string" indexType="keyword" localizable="true" name="txtSaqaNumber" readOnly="false" repeatable="false" required="false" showLabel="true" type="text" width="small"> <meta-data locale="en_US"> <entry name="label"> <![CDATA[SAQA Number]]> </entry> <entry name="predefinedValue"> <![CDATA[]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <dynamic-element dataType="document-library" fieldNamespace="ddm" indexType="keyword" localizable="true" name="docBanner" readOnly="false" repeatable="false" required="false" showLabel="true" type="ddm-documentlibrary" width=""> <meta-data locale="en_US"> <entry name="label"> <![CDATA[Course Banner]]> </entry> <entry name="predefinedValue"> <![CDATA[]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <dynamic-element dataType="string" indexType="keyword" localizable="true" name="txtActivePageBreadcrumb" readOnly="false" repeatable="false" required="false" showLabel="true" type="text" width="small"> <dynamic-element dataType="string" indexType="keyword" localizable="true" name="txtBreadcrumbTitle" readOnly="false" repeatable="true" required="false" showLabel="true" type="text" width="small"> <dynamic-element dataType="link-to-page" fieldNamespace="ddm" indexType="keyword" localizable="true" name="linkPageBreadcrumb" readOnly="false" repeatable="false" required="false" showLabel="true" type="ddm-link-to-page" width="small"> <meta-data locale="en_US"> <entry name="label"> <![CDATA[Breadcrumb Link to Page]]> </entry> <entry name="predefinedValue"> <![CDATA[]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <meta-data locale="en_US"> <entry name="label"> <![CDATA[Breadcrumb Title]]> </entry> <entry name="predefinedValue"> <![CDATA[]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <meta-data locale="en_US"> <entry name="label"> <![CDATA[Active Page Breadcrumb Title]]> </entry> <entry name="predefinedValue"> <![CDATA[]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <dynamic-element dataType="string" indexType="keyword" localizable="true" name="txtTabularContentHeading" readOnly="false" repeatable="false" required="false" showLabel="true" type="text" width="small"> <dynamic-element dataType="string" indexType="keyword" localizable="true" name="txtLabel" readOnly="false" repeatable="true" required="false" showLabel="true" type="text" width="small"> <dynamic-element dataType="string" indexType="keyword" localizable="true" name="txtValue" readOnly="false" repeatable="false" required="false" showLabel="true" type="text" width="small"> <meta-data locale="en_US"> <entry name="label"> <![CDATA[Value]]> </entry> <entry name="predefinedValue"> <![CDATA[]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <meta-data locale="en_US"> <entry name="label"> <![CDATA[Label]]> </entry> <entry name="predefinedValue"> <![CDATA[]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <meta-data locale="en_US"> <entry name="label"> <![CDATA[Tabular Content Heading]]> </entry> <entry name="predefinedValue"> <![CDATA[Key dates]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <dynamic-element dataType="string" indexType="keyword" localizable="true" name="txtDownloadLinksHeading" readOnly="false" repeatable="false" required="false" showLabel="true" type="text" width="small"> <dynamic-element dataType="string" indexType="keyword" localizable="true" name="txtDownloadableLabel" readOnly="false" repeatable="true" required="false" showLabel="true" type="text" width="small"> <dynamic-element dataType="document-library" fieldNamespace="ddm" indexType="keyword" localizable="true" name="docDownloadable" readOnly="false" repeatable="false" required="false" showLabel="true" type="ddm-documentlibrary" width=""> <meta-data locale="en_US"> <entry name="label"> <![CDATA[Documents and Media]]> </entry> <entry name="predefinedValue"> <![CDATA[]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <dynamic-element dataType="string" indexType="keyword" localizable="true" name="txtExternalLink" readOnly="false" repeatable="false" required="false" showLabel="true" type="text" width="small"> <meta-data locale="en_US"> <entry name="label"> <![CDATA[External Link]]> </entry> <entry name="predefinedValue"> <![CDATA[]]> </entry> <entry name="tip"> <![CDATA[If an external link is specified, the Documents and Media value is ignored]]> </entry> </meta-data> </dynamic-element> <dynamic-element dataType="boolean" indexType="keyword" localizable="true" name="blnNewWindow" readOnly="false" repeatable="false" required="false" showLabel="true" type="checkbox" width=""> <meta-data locale="en_US"> <entry name="label"> <![CDATA[Open in new window]]> </entry> <entry name="predefinedValue"> <![CDATA[true]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <meta-data locale="en_US"> <entry name="label"> <![CDATA[Downloadable Document]]> </entry> <entry name="predefinedValue"> <![CDATA[]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <meta-data locale="en_US"> <entry name="label"> <![CDATA[Download Links Heading]]> </entry> <entry name="predefinedValue"> <![CDATA[]]> </entry> <entry name="tip"> <![CDATA[Leave this blank if you don't need a heading]]> </entry> </meta-data> </dynamic-element></root> Please sign in to reply. Reply as... Cancel Armando Ramirez Javeed Chida 7 Years Ago thank you for your answer, I need something like this:https://s17.postimg.org/qb7gjwngf/busqueda_Truqueada.png Please sign in to reply. Reply as... Cancel Armando Ramirez Armando Ramirez 7 Years Ago Basically I try to add styles to the results in a search Please sign in to reply. Reply as... Cancel Javeed Chida Armando Ramirez 7 Years Ago - Edited Ah! So, then what you need is to write a JSP hook to replace the code running under /webapps/ROOT/html/portlet/search/You may have to tweak one or more of the jspf fragments in that folder. As a quick experiment, try tweaking those files to see how your search results get altered. Lifeary's documentation on hooks is here:https://www.liferay.com/documentation/liferay-portal/6.0/development/-/ai/overriding-a-jsp?_ga=1.75370449.2126301223.1479500233Keep in mind that my approach to locating the display logic for each search result in a content template is just one idea. I did that because each search result is guaranteed to be a content item of type course (for my business requirements). if you're getting various types of content back, then you need to think afresh on how best to achieve that separation. In essence, however, it all comes down to the code you put in your JSP hook to replace the existing search results functionality.Hope that helps. And good luck! Please sign in to reply. Reply as... Cancel Javeed Chida Armando Ramirez 7 Years Ago Unfortunately not. I was only sharing the approach I adopted. The project is managed within our dev team. Please sign in to reply. Reply as... Cancel Srinivas P Javeed Chida 5 Years Ago Hi All, I want show the bookmark entry on top in search result, when I enter any content in search if that content related bookmark is available. Can any help me out. How to achieve it in Liferay DXP. Please sign in to reply. Reply as... Cancel
Javeed Chida Armando Ramirez 7 Years Ago Hi Armando. Thanks for the comment. First off, your site would need some sort of content. That content may (or may not) have a specific structure. In my case, the structure is called "Course". I had defined a template for that structure, also called "Course". The hook I refer to was specific to the search portlet. Instead of coding a duplicate front end for each course in the hook's JSP, it made much more sense to simply load the course content (i.e. journal article XML) and then transform the content xml to XHTML using the template associated with the course structure. So the hook code makes a call to JournalArticleLocateServiceUtil.getArticleContent() which takes the template key as one of its parameters.Next, the ADT. The ADT is not used by the hook, rather it is picked as the Display Template from the Display Settings tab of an Asset Publisher portlet. This may not be relevant to your site, but it was for mine. All that course content I was showing through my search portlet also had to be shown for each school using an Asset Publisher portlet instance. So I coded an ADT that could be shared on each School's landing page. All we did was configure the Asset Publisher instance to bring back content having a category that matched the corresponding school name. E.g. Business School.Hope that helps. Please sign in to reply. Reply as... Cancel Armando Ramirez Javeed Chida 7 Years Ago Javeed, thank you for the answer, Do you have the project in github? Please sign in to reply. Reply as... Cancel Armando Ramirez Armando Ramirez 7 Years Ago or you can show the structure? tank you!! Please sign in to reply. Reply as... Cancel Javeed Chida Armando Ramirez 7 Years Ago I'm not sure what you're after here. The structure I used is pretty involved and specific to our business requirements. I pasted the XML for it here, you can paste it into the Source view of a new structure to see what it looks like. <root available-locales="en_US" default-locale="en_US"> <dynamic-element dataType="string" indexType="keyword" localizable="true" name="txtCourseName" readOnly="false" repeatable="false" required="true" showLabel="true" type="text" width="small"> <meta-data locale="en_US"> <entry name="label"> <![CDATA[Course Name]]> </entry> <entry name="predefinedValue"> <![CDATA[]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <dynamic-element dataType="html" fieldNamespace="ddm" indexType="keyword" localizable="true" name="htmlCourseLead" readOnly="false" repeatable="false" required="false" showLabel="true" type="ddm-text-html" width="small"> <dynamic-element dataType="string" indexType="keyword" localizable="true" name="txtTabTitle" readOnly="false" repeatable="true" required="false" showLabel="true" type="text" width="large"> <dynamic-element dataType="string" indexType="keyword" localizable="true" name="txtTabId" readOnly="false" repeatable="false" required="false" showLabel="true" type="text" width="small"> <meta-data locale="en_US"> <entry name="label"> <![CDATA[Tab Identifier]]> </entry> <entry name="predefinedValue"> <![CDATA[]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <dynamic-element dataType="html" fieldNamespace="ddm" indexType="keyword" localizable="true" name="htmlTabContent" readOnly="false" repeatable="false" required="false" showLabel="true" type="ddm-text-html" width="large"> <meta-data locale="en_US"> <entry name="label"> <![CDATA[Course Content]]> </entry> <entry name="predefinedValue"> <![CDATA[]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <meta-data locale="en_US"> <entry name="label"> <![CDATA[Course Tab Title]]> </entry> <entry name="predefinedValue"> <![CDATA[]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <meta-data locale="en_US"> <entry name="label"> <![CDATA[Course Lead Text]]> </entry> <entry name="predefinedValue"> <![CDATA[]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <dynamic-element dataType="string" indexType="keyword" localizable="true" name="txtFeesFundingUrl" readOnly="false" repeatable="false" required="false" showLabel="true" type="text" width="small"> <meta-data locale="en_US"> <entry name="label"> <![CDATA[Fees & Funding URL for this course]]> </entry> <entry name="predefinedValue"> <![CDATA[]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <dynamic-element dataType="boolean" indexType="keyword" localizable="true" name="blnShowFeesFunding" readOnly="false" repeatable="false" required="false" showLabel="true" type="checkbox" width=""> <meta-data locale="en_US"> <entry name="label"> <![CDATA[Show 'Fees & Funding' tab]]> </entry> <entry name="predefinedValue"> <![CDATA[false]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <dynamic-element dataType="boolean" indexType="keyword" localizable="true" name="blnShowHowToApply" readOnly="false" repeatable="false" required="false" showLabel="true" type="checkbox" width=""> <meta-data locale="en_US"> <entry name="label"> <![CDATA[Show 'How to Apply' Tab]]> </entry> <entry name="predefinedValue"> <![CDATA[false]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <dynamic-element dataType="string" indexType="keyword" localizable="true" name="txtNqfLevel" readOnly="false" repeatable="false" required="false" showLabel="true" type="text" width="small"> <meta-data locale="en_US"> <entry name="label"> <![CDATA[NQF Level]]> </entry> <entry name="predefinedValue"> <![CDATA[]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <dynamic-element dataType="string" indexType="keyword" localizable="true" name="txtSaqaNumber" readOnly="false" repeatable="false" required="false" showLabel="true" type="text" width="small"> <meta-data locale="en_US"> <entry name="label"> <![CDATA[SAQA Number]]> </entry> <entry name="predefinedValue"> <![CDATA[]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <dynamic-element dataType="document-library" fieldNamespace="ddm" indexType="keyword" localizable="true" name="docBanner" readOnly="false" repeatable="false" required="false" showLabel="true" type="ddm-documentlibrary" width=""> <meta-data locale="en_US"> <entry name="label"> <![CDATA[Course Banner]]> </entry> <entry name="predefinedValue"> <![CDATA[]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <dynamic-element dataType="string" indexType="keyword" localizable="true" name="txtActivePageBreadcrumb" readOnly="false" repeatable="false" required="false" showLabel="true" type="text" width="small"> <dynamic-element dataType="string" indexType="keyword" localizable="true" name="txtBreadcrumbTitle" readOnly="false" repeatable="true" required="false" showLabel="true" type="text" width="small"> <dynamic-element dataType="link-to-page" fieldNamespace="ddm" indexType="keyword" localizable="true" name="linkPageBreadcrumb" readOnly="false" repeatable="false" required="false" showLabel="true" type="ddm-link-to-page" width="small"> <meta-data locale="en_US"> <entry name="label"> <![CDATA[Breadcrumb Link to Page]]> </entry> <entry name="predefinedValue"> <![CDATA[]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <meta-data locale="en_US"> <entry name="label"> <![CDATA[Breadcrumb Title]]> </entry> <entry name="predefinedValue"> <![CDATA[]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <meta-data locale="en_US"> <entry name="label"> <![CDATA[Active Page Breadcrumb Title]]> </entry> <entry name="predefinedValue"> <![CDATA[]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <dynamic-element dataType="string" indexType="keyword" localizable="true" name="txtTabularContentHeading" readOnly="false" repeatable="false" required="false" showLabel="true" type="text" width="small"> <dynamic-element dataType="string" indexType="keyword" localizable="true" name="txtLabel" readOnly="false" repeatable="true" required="false" showLabel="true" type="text" width="small"> <dynamic-element dataType="string" indexType="keyword" localizable="true" name="txtValue" readOnly="false" repeatable="false" required="false" showLabel="true" type="text" width="small"> <meta-data locale="en_US"> <entry name="label"> <![CDATA[Value]]> </entry> <entry name="predefinedValue"> <![CDATA[]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <meta-data locale="en_US"> <entry name="label"> <![CDATA[Label]]> </entry> <entry name="predefinedValue"> <![CDATA[]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <meta-data locale="en_US"> <entry name="label"> <![CDATA[Tabular Content Heading]]> </entry> <entry name="predefinedValue"> <![CDATA[Key dates]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <dynamic-element dataType="string" indexType="keyword" localizable="true" name="txtDownloadLinksHeading" readOnly="false" repeatable="false" required="false" showLabel="true" type="text" width="small"> <dynamic-element dataType="string" indexType="keyword" localizable="true" name="txtDownloadableLabel" readOnly="false" repeatable="true" required="false" showLabel="true" type="text" width="small"> <dynamic-element dataType="document-library" fieldNamespace="ddm" indexType="keyword" localizable="true" name="docDownloadable" readOnly="false" repeatable="false" required="false" showLabel="true" type="ddm-documentlibrary" width=""> <meta-data locale="en_US"> <entry name="label"> <![CDATA[Documents and Media]]> </entry> <entry name="predefinedValue"> <![CDATA[]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <dynamic-element dataType="string" indexType="keyword" localizable="true" name="txtExternalLink" readOnly="false" repeatable="false" required="false" showLabel="true" type="text" width="small"> <meta-data locale="en_US"> <entry name="label"> <![CDATA[External Link]]> </entry> <entry name="predefinedValue"> <![CDATA[]]> </entry> <entry name="tip"> <![CDATA[If an external link is specified, the Documents and Media value is ignored]]> </entry> </meta-data> </dynamic-element> <dynamic-element dataType="boolean" indexType="keyword" localizable="true" name="blnNewWindow" readOnly="false" repeatable="false" required="false" showLabel="true" type="checkbox" width=""> <meta-data locale="en_US"> <entry name="label"> <![CDATA[Open in new window]]> </entry> <entry name="predefinedValue"> <![CDATA[true]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <meta-data locale="en_US"> <entry name="label"> <![CDATA[Downloadable Document]]> </entry> <entry name="predefinedValue"> <![CDATA[]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <meta-data locale="en_US"> <entry name="label"> <![CDATA[Download Links Heading]]> </entry> <entry name="predefinedValue"> <![CDATA[]]> </entry> <entry name="tip"> <![CDATA[Leave this blank if you don't need a heading]]> </entry> </meta-data> </dynamic-element></root> Please sign in to reply. Reply as... Cancel Armando Ramirez Javeed Chida 7 Years Ago thank you for your answer, I need something like this:https://s17.postimg.org/qb7gjwngf/busqueda_Truqueada.png Please sign in to reply. Reply as... Cancel Armando Ramirez Armando Ramirez 7 Years Ago Basically I try to add styles to the results in a search Please sign in to reply. Reply as... Cancel Javeed Chida Armando Ramirez 7 Years Ago - Edited Ah! So, then what you need is to write a JSP hook to replace the code running under /webapps/ROOT/html/portlet/search/You may have to tweak one or more of the jspf fragments in that folder. As a quick experiment, try tweaking those files to see how your search results get altered. Lifeary's documentation on hooks is here:https://www.liferay.com/documentation/liferay-portal/6.0/development/-/ai/overriding-a-jsp?_ga=1.75370449.2126301223.1479500233Keep in mind that my approach to locating the display logic for each search result in a content template is just one idea. I did that because each search result is guaranteed to be a content item of type course (for my business requirements). if you're getting various types of content back, then you need to think afresh on how best to achieve that separation. In essence, however, it all comes down to the code you put in your JSP hook to replace the existing search results functionality.Hope that helps. And good luck! Please sign in to reply. Reply as... Cancel Javeed Chida Armando Ramirez 7 Years Ago Unfortunately not. I was only sharing the approach I adopted. The project is managed within our dev team. Please sign in to reply. Reply as... Cancel Srinivas P Javeed Chida 5 Years Ago Hi All, I want show the bookmark entry on top in search result, when I enter any content in search if that content related bookmark is available. Can any help me out. How to achieve it in Liferay DXP. Please sign in to reply. Reply as... Cancel
Armando Ramirez Javeed Chida 7 Years Ago Javeed, thank you for the answer, Do you have the project in github? Please sign in to reply. Reply as... Cancel Armando Ramirez Armando Ramirez 7 Years Ago or you can show the structure? tank you!! Please sign in to reply. Reply as... Cancel Javeed Chida Armando Ramirez 7 Years Ago I'm not sure what you're after here. The structure I used is pretty involved and specific to our business requirements. I pasted the XML for it here, you can paste it into the Source view of a new structure to see what it looks like. <root available-locales="en_US" default-locale="en_US"> <dynamic-element dataType="string" indexType="keyword" localizable="true" name="txtCourseName" readOnly="false" repeatable="false" required="true" showLabel="true" type="text" width="small"> <meta-data locale="en_US"> <entry name="label"> <![CDATA[Course Name]]> </entry> <entry name="predefinedValue"> <![CDATA[]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <dynamic-element dataType="html" fieldNamespace="ddm" indexType="keyword" localizable="true" name="htmlCourseLead" readOnly="false" repeatable="false" required="false" showLabel="true" type="ddm-text-html" width="small"> <dynamic-element dataType="string" indexType="keyword" localizable="true" name="txtTabTitle" readOnly="false" repeatable="true" required="false" showLabel="true" type="text" width="large"> <dynamic-element dataType="string" indexType="keyword" localizable="true" name="txtTabId" readOnly="false" repeatable="false" required="false" showLabel="true" type="text" width="small"> <meta-data locale="en_US"> <entry name="label"> <![CDATA[Tab Identifier]]> </entry> <entry name="predefinedValue"> <![CDATA[]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <dynamic-element dataType="html" fieldNamespace="ddm" indexType="keyword" localizable="true" name="htmlTabContent" readOnly="false" repeatable="false" required="false" showLabel="true" type="ddm-text-html" width="large"> <meta-data locale="en_US"> <entry name="label"> <![CDATA[Course Content]]> </entry> <entry name="predefinedValue"> <![CDATA[]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <meta-data locale="en_US"> <entry name="label"> <![CDATA[Course Tab Title]]> </entry> <entry name="predefinedValue"> <![CDATA[]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <meta-data locale="en_US"> <entry name="label"> <![CDATA[Course Lead Text]]> </entry> <entry name="predefinedValue"> <![CDATA[]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <dynamic-element dataType="string" indexType="keyword" localizable="true" name="txtFeesFundingUrl" readOnly="false" repeatable="false" required="false" showLabel="true" type="text" width="small"> <meta-data locale="en_US"> <entry name="label"> <![CDATA[Fees & Funding URL for this course]]> </entry> <entry name="predefinedValue"> <![CDATA[]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <dynamic-element dataType="boolean" indexType="keyword" localizable="true" name="blnShowFeesFunding" readOnly="false" repeatable="false" required="false" showLabel="true" type="checkbox" width=""> <meta-data locale="en_US"> <entry name="label"> <![CDATA[Show 'Fees & Funding' tab]]> </entry> <entry name="predefinedValue"> <![CDATA[false]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <dynamic-element dataType="boolean" indexType="keyword" localizable="true" name="blnShowHowToApply" readOnly="false" repeatable="false" required="false" showLabel="true" type="checkbox" width=""> <meta-data locale="en_US"> <entry name="label"> <![CDATA[Show 'How to Apply' Tab]]> </entry> <entry name="predefinedValue"> <![CDATA[false]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <dynamic-element dataType="string" indexType="keyword" localizable="true" name="txtNqfLevel" readOnly="false" repeatable="false" required="false" showLabel="true" type="text" width="small"> <meta-data locale="en_US"> <entry name="label"> <![CDATA[NQF Level]]> </entry> <entry name="predefinedValue"> <![CDATA[]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <dynamic-element dataType="string" indexType="keyword" localizable="true" name="txtSaqaNumber" readOnly="false" repeatable="false" required="false" showLabel="true" type="text" width="small"> <meta-data locale="en_US"> <entry name="label"> <![CDATA[SAQA Number]]> </entry> <entry name="predefinedValue"> <![CDATA[]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <dynamic-element dataType="document-library" fieldNamespace="ddm" indexType="keyword" localizable="true" name="docBanner" readOnly="false" repeatable="false" required="false" showLabel="true" type="ddm-documentlibrary" width=""> <meta-data locale="en_US"> <entry name="label"> <![CDATA[Course Banner]]> </entry> <entry name="predefinedValue"> <![CDATA[]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <dynamic-element dataType="string" indexType="keyword" localizable="true" name="txtActivePageBreadcrumb" readOnly="false" repeatable="false" required="false" showLabel="true" type="text" width="small"> <dynamic-element dataType="string" indexType="keyword" localizable="true" name="txtBreadcrumbTitle" readOnly="false" repeatable="true" required="false" showLabel="true" type="text" width="small"> <dynamic-element dataType="link-to-page" fieldNamespace="ddm" indexType="keyword" localizable="true" name="linkPageBreadcrumb" readOnly="false" repeatable="false" required="false" showLabel="true" type="ddm-link-to-page" width="small"> <meta-data locale="en_US"> <entry name="label"> <![CDATA[Breadcrumb Link to Page]]> </entry> <entry name="predefinedValue"> <![CDATA[]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <meta-data locale="en_US"> <entry name="label"> <![CDATA[Breadcrumb Title]]> </entry> <entry name="predefinedValue"> <![CDATA[]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <meta-data locale="en_US"> <entry name="label"> <![CDATA[Active Page Breadcrumb Title]]> </entry> <entry name="predefinedValue"> <![CDATA[]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <dynamic-element dataType="string" indexType="keyword" localizable="true" name="txtTabularContentHeading" readOnly="false" repeatable="false" required="false" showLabel="true" type="text" width="small"> <dynamic-element dataType="string" indexType="keyword" localizable="true" name="txtLabel" readOnly="false" repeatable="true" required="false" showLabel="true" type="text" width="small"> <dynamic-element dataType="string" indexType="keyword" localizable="true" name="txtValue" readOnly="false" repeatable="false" required="false" showLabel="true" type="text" width="small"> <meta-data locale="en_US"> <entry name="label"> <![CDATA[Value]]> </entry> <entry name="predefinedValue"> <![CDATA[]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <meta-data locale="en_US"> <entry name="label"> <![CDATA[Label]]> </entry> <entry name="predefinedValue"> <![CDATA[]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <meta-data locale="en_US"> <entry name="label"> <![CDATA[Tabular Content Heading]]> </entry> <entry name="predefinedValue"> <![CDATA[Key dates]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <dynamic-element dataType="string" indexType="keyword" localizable="true" name="txtDownloadLinksHeading" readOnly="false" repeatable="false" required="false" showLabel="true" type="text" width="small"> <dynamic-element dataType="string" indexType="keyword" localizable="true" name="txtDownloadableLabel" readOnly="false" repeatable="true" required="false" showLabel="true" type="text" width="small"> <dynamic-element dataType="document-library" fieldNamespace="ddm" indexType="keyword" localizable="true" name="docDownloadable" readOnly="false" repeatable="false" required="false" showLabel="true" type="ddm-documentlibrary" width=""> <meta-data locale="en_US"> <entry name="label"> <![CDATA[Documents and Media]]> </entry> <entry name="predefinedValue"> <![CDATA[]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <dynamic-element dataType="string" indexType="keyword" localizable="true" name="txtExternalLink" readOnly="false" repeatable="false" required="false" showLabel="true" type="text" width="small"> <meta-data locale="en_US"> <entry name="label"> <![CDATA[External Link]]> </entry> <entry name="predefinedValue"> <![CDATA[]]> </entry> <entry name="tip"> <![CDATA[If an external link is specified, the Documents and Media value is ignored]]> </entry> </meta-data> </dynamic-element> <dynamic-element dataType="boolean" indexType="keyword" localizable="true" name="blnNewWindow" readOnly="false" repeatable="false" required="false" showLabel="true" type="checkbox" width=""> <meta-data locale="en_US"> <entry name="label"> <![CDATA[Open in new window]]> </entry> <entry name="predefinedValue"> <![CDATA[true]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <meta-data locale="en_US"> <entry name="label"> <![CDATA[Downloadable Document]]> </entry> <entry name="predefinedValue"> <![CDATA[]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <meta-data locale="en_US"> <entry name="label"> <![CDATA[Download Links Heading]]> </entry> <entry name="predefinedValue"> <![CDATA[]]> </entry> <entry name="tip"> <![CDATA[Leave this blank if you don't need a heading]]> </entry> </meta-data> </dynamic-element></root> Please sign in to reply. Reply as... Cancel Armando Ramirez Javeed Chida 7 Years Ago thank you for your answer, I need something like this:https://s17.postimg.org/qb7gjwngf/busqueda_Truqueada.png Please sign in to reply. Reply as... Cancel Armando Ramirez Armando Ramirez 7 Years Ago Basically I try to add styles to the results in a search Please sign in to reply. Reply as... Cancel Javeed Chida Armando Ramirez 7 Years Ago - Edited Ah! So, then what you need is to write a JSP hook to replace the code running under /webapps/ROOT/html/portlet/search/You may have to tweak one or more of the jspf fragments in that folder. As a quick experiment, try tweaking those files to see how your search results get altered. Lifeary's documentation on hooks is here:https://www.liferay.com/documentation/liferay-portal/6.0/development/-/ai/overriding-a-jsp?_ga=1.75370449.2126301223.1479500233Keep in mind that my approach to locating the display logic for each search result in a content template is just one idea. I did that because each search result is guaranteed to be a content item of type course (for my business requirements). if you're getting various types of content back, then you need to think afresh on how best to achieve that separation. In essence, however, it all comes down to the code you put in your JSP hook to replace the existing search results functionality.Hope that helps. And good luck! Please sign in to reply. Reply as... Cancel Javeed Chida Armando Ramirez 7 Years Ago Unfortunately not. I was only sharing the approach I adopted. The project is managed within our dev team. Please sign in to reply. Reply as... Cancel Srinivas P Javeed Chida 5 Years Ago Hi All, I want show the bookmark entry on top in search result, when I enter any content in search if that content related bookmark is available. Can any help me out. How to achieve it in Liferay DXP. Please sign in to reply. Reply as... Cancel
Armando Ramirez Armando Ramirez 7 Years Ago or you can show the structure? tank you!! Please sign in to reply. Reply as... Cancel Javeed Chida Armando Ramirez 7 Years Ago I'm not sure what you're after here. The structure I used is pretty involved and specific to our business requirements. I pasted the XML for it here, you can paste it into the Source view of a new structure to see what it looks like. <root available-locales="en_US" default-locale="en_US"> <dynamic-element dataType="string" indexType="keyword" localizable="true" name="txtCourseName" readOnly="false" repeatable="false" required="true" showLabel="true" type="text" width="small"> <meta-data locale="en_US"> <entry name="label"> <![CDATA[Course Name]]> </entry> <entry name="predefinedValue"> <![CDATA[]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <dynamic-element dataType="html" fieldNamespace="ddm" indexType="keyword" localizable="true" name="htmlCourseLead" readOnly="false" repeatable="false" required="false" showLabel="true" type="ddm-text-html" width="small"> <dynamic-element dataType="string" indexType="keyword" localizable="true" name="txtTabTitle" readOnly="false" repeatable="true" required="false" showLabel="true" type="text" width="large"> <dynamic-element dataType="string" indexType="keyword" localizable="true" name="txtTabId" readOnly="false" repeatable="false" required="false" showLabel="true" type="text" width="small"> <meta-data locale="en_US"> <entry name="label"> <![CDATA[Tab Identifier]]> </entry> <entry name="predefinedValue"> <![CDATA[]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <dynamic-element dataType="html" fieldNamespace="ddm" indexType="keyword" localizable="true" name="htmlTabContent" readOnly="false" repeatable="false" required="false" showLabel="true" type="ddm-text-html" width="large"> <meta-data locale="en_US"> <entry name="label"> <![CDATA[Course Content]]> </entry> <entry name="predefinedValue"> <![CDATA[]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <meta-data locale="en_US"> <entry name="label"> <![CDATA[Course Tab Title]]> </entry> <entry name="predefinedValue"> <![CDATA[]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <meta-data locale="en_US"> <entry name="label"> <![CDATA[Course Lead Text]]> </entry> <entry name="predefinedValue"> <![CDATA[]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <dynamic-element dataType="string" indexType="keyword" localizable="true" name="txtFeesFundingUrl" readOnly="false" repeatable="false" required="false" showLabel="true" type="text" width="small"> <meta-data locale="en_US"> <entry name="label"> <![CDATA[Fees & Funding URL for this course]]> </entry> <entry name="predefinedValue"> <![CDATA[]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <dynamic-element dataType="boolean" indexType="keyword" localizable="true" name="blnShowFeesFunding" readOnly="false" repeatable="false" required="false" showLabel="true" type="checkbox" width=""> <meta-data locale="en_US"> <entry name="label"> <![CDATA[Show 'Fees & Funding' tab]]> </entry> <entry name="predefinedValue"> <![CDATA[false]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <dynamic-element dataType="boolean" indexType="keyword" localizable="true" name="blnShowHowToApply" readOnly="false" repeatable="false" required="false" showLabel="true" type="checkbox" width=""> <meta-data locale="en_US"> <entry name="label"> <![CDATA[Show 'How to Apply' Tab]]> </entry> <entry name="predefinedValue"> <![CDATA[false]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <dynamic-element dataType="string" indexType="keyword" localizable="true" name="txtNqfLevel" readOnly="false" repeatable="false" required="false" showLabel="true" type="text" width="small"> <meta-data locale="en_US"> <entry name="label"> <![CDATA[NQF Level]]> </entry> <entry name="predefinedValue"> <![CDATA[]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <dynamic-element dataType="string" indexType="keyword" localizable="true" name="txtSaqaNumber" readOnly="false" repeatable="false" required="false" showLabel="true" type="text" width="small"> <meta-data locale="en_US"> <entry name="label"> <![CDATA[SAQA Number]]> </entry> <entry name="predefinedValue"> <![CDATA[]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <dynamic-element dataType="document-library" fieldNamespace="ddm" indexType="keyword" localizable="true" name="docBanner" readOnly="false" repeatable="false" required="false" showLabel="true" type="ddm-documentlibrary" width=""> <meta-data locale="en_US"> <entry name="label"> <![CDATA[Course Banner]]> </entry> <entry name="predefinedValue"> <![CDATA[]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <dynamic-element dataType="string" indexType="keyword" localizable="true" name="txtActivePageBreadcrumb" readOnly="false" repeatable="false" required="false" showLabel="true" type="text" width="small"> <dynamic-element dataType="string" indexType="keyword" localizable="true" name="txtBreadcrumbTitle" readOnly="false" repeatable="true" required="false" showLabel="true" type="text" width="small"> <dynamic-element dataType="link-to-page" fieldNamespace="ddm" indexType="keyword" localizable="true" name="linkPageBreadcrumb" readOnly="false" repeatable="false" required="false" showLabel="true" type="ddm-link-to-page" width="small"> <meta-data locale="en_US"> <entry name="label"> <![CDATA[Breadcrumb Link to Page]]> </entry> <entry name="predefinedValue"> <![CDATA[]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <meta-data locale="en_US"> <entry name="label"> <![CDATA[Breadcrumb Title]]> </entry> <entry name="predefinedValue"> <![CDATA[]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <meta-data locale="en_US"> <entry name="label"> <![CDATA[Active Page Breadcrumb Title]]> </entry> <entry name="predefinedValue"> <![CDATA[]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <dynamic-element dataType="string" indexType="keyword" localizable="true" name="txtTabularContentHeading" readOnly="false" repeatable="false" required="false" showLabel="true" type="text" width="small"> <dynamic-element dataType="string" indexType="keyword" localizable="true" name="txtLabel" readOnly="false" repeatable="true" required="false" showLabel="true" type="text" width="small"> <dynamic-element dataType="string" indexType="keyword" localizable="true" name="txtValue" readOnly="false" repeatable="false" required="false" showLabel="true" type="text" width="small"> <meta-data locale="en_US"> <entry name="label"> <![CDATA[Value]]> </entry> <entry name="predefinedValue"> <![CDATA[]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <meta-data locale="en_US"> <entry name="label"> <![CDATA[Label]]> </entry> <entry name="predefinedValue"> <![CDATA[]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <meta-data locale="en_US"> <entry name="label"> <![CDATA[Tabular Content Heading]]> </entry> <entry name="predefinedValue"> <![CDATA[Key dates]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <dynamic-element dataType="string" indexType="keyword" localizable="true" name="txtDownloadLinksHeading" readOnly="false" repeatable="false" required="false" showLabel="true" type="text" width="small"> <dynamic-element dataType="string" indexType="keyword" localizable="true" name="txtDownloadableLabel" readOnly="false" repeatable="true" required="false" showLabel="true" type="text" width="small"> <dynamic-element dataType="document-library" fieldNamespace="ddm" indexType="keyword" localizable="true" name="docDownloadable" readOnly="false" repeatable="false" required="false" showLabel="true" type="ddm-documentlibrary" width=""> <meta-data locale="en_US"> <entry name="label"> <![CDATA[Documents and Media]]> </entry> <entry name="predefinedValue"> <![CDATA[]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <dynamic-element dataType="string" indexType="keyword" localizable="true" name="txtExternalLink" readOnly="false" repeatable="false" required="false" showLabel="true" type="text" width="small"> <meta-data locale="en_US"> <entry name="label"> <![CDATA[External Link]]> </entry> <entry name="predefinedValue"> <![CDATA[]]> </entry> <entry name="tip"> <![CDATA[If an external link is specified, the Documents and Media value is ignored]]> </entry> </meta-data> </dynamic-element> <dynamic-element dataType="boolean" indexType="keyword" localizable="true" name="blnNewWindow" readOnly="false" repeatable="false" required="false" showLabel="true" type="checkbox" width=""> <meta-data locale="en_US"> <entry name="label"> <![CDATA[Open in new window]]> </entry> <entry name="predefinedValue"> <![CDATA[true]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <meta-data locale="en_US"> <entry name="label"> <![CDATA[Downloadable Document]]> </entry> <entry name="predefinedValue"> <![CDATA[]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <meta-data locale="en_US"> <entry name="label"> <![CDATA[Download Links Heading]]> </entry> <entry name="predefinedValue"> <![CDATA[]]> </entry> <entry name="tip"> <![CDATA[Leave this blank if you don't need a heading]]> </entry> </meta-data> </dynamic-element></root> Please sign in to reply. Reply as... Cancel Armando Ramirez Javeed Chida 7 Years Ago thank you for your answer, I need something like this:https://s17.postimg.org/qb7gjwngf/busqueda_Truqueada.png Please sign in to reply. Reply as... Cancel Armando Ramirez Armando Ramirez 7 Years Ago Basically I try to add styles to the results in a search Please sign in to reply. Reply as... Cancel Javeed Chida Armando Ramirez 7 Years Ago - Edited Ah! So, then what you need is to write a JSP hook to replace the code running under /webapps/ROOT/html/portlet/search/You may have to tweak one or more of the jspf fragments in that folder. As a quick experiment, try tweaking those files to see how your search results get altered. Lifeary's documentation on hooks is here:https://www.liferay.com/documentation/liferay-portal/6.0/development/-/ai/overriding-a-jsp?_ga=1.75370449.2126301223.1479500233Keep in mind that my approach to locating the display logic for each search result in a content template is just one idea. I did that because each search result is guaranteed to be a content item of type course (for my business requirements). if you're getting various types of content back, then you need to think afresh on how best to achieve that separation. In essence, however, it all comes down to the code you put in your JSP hook to replace the existing search results functionality.Hope that helps. And good luck! Please sign in to reply. Reply as... Cancel
Javeed Chida Armando Ramirez 7 Years Ago I'm not sure what you're after here. The structure I used is pretty involved and specific to our business requirements. I pasted the XML for it here, you can paste it into the Source view of a new structure to see what it looks like. <root available-locales="en_US" default-locale="en_US"> <dynamic-element dataType="string" indexType="keyword" localizable="true" name="txtCourseName" readOnly="false" repeatable="false" required="true" showLabel="true" type="text" width="small"> <meta-data locale="en_US"> <entry name="label"> <![CDATA[Course Name]]> </entry> <entry name="predefinedValue"> <![CDATA[]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <dynamic-element dataType="html" fieldNamespace="ddm" indexType="keyword" localizable="true" name="htmlCourseLead" readOnly="false" repeatable="false" required="false" showLabel="true" type="ddm-text-html" width="small"> <dynamic-element dataType="string" indexType="keyword" localizable="true" name="txtTabTitle" readOnly="false" repeatable="true" required="false" showLabel="true" type="text" width="large"> <dynamic-element dataType="string" indexType="keyword" localizable="true" name="txtTabId" readOnly="false" repeatable="false" required="false" showLabel="true" type="text" width="small"> <meta-data locale="en_US"> <entry name="label"> <![CDATA[Tab Identifier]]> </entry> <entry name="predefinedValue"> <![CDATA[]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <dynamic-element dataType="html" fieldNamespace="ddm" indexType="keyword" localizable="true" name="htmlTabContent" readOnly="false" repeatable="false" required="false" showLabel="true" type="ddm-text-html" width="large"> <meta-data locale="en_US"> <entry name="label"> <![CDATA[Course Content]]> </entry> <entry name="predefinedValue"> <![CDATA[]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <meta-data locale="en_US"> <entry name="label"> <![CDATA[Course Tab Title]]> </entry> <entry name="predefinedValue"> <![CDATA[]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <meta-data locale="en_US"> <entry name="label"> <![CDATA[Course Lead Text]]> </entry> <entry name="predefinedValue"> <![CDATA[]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <dynamic-element dataType="string" indexType="keyword" localizable="true" name="txtFeesFundingUrl" readOnly="false" repeatable="false" required="false" showLabel="true" type="text" width="small"> <meta-data locale="en_US"> <entry name="label"> <![CDATA[Fees & Funding URL for this course]]> </entry> <entry name="predefinedValue"> <![CDATA[]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <dynamic-element dataType="boolean" indexType="keyword" localizable="true" name="blnShowFeesFunding" readOnly="false" repeatable="false" required="false" showLabel="true" type="checkbox" width=""> <meta-data locale="en_US"> <entry name="label"> <![CDATA[Show 'Fees & Funding' tab]]> </entry> <entry name="predefinedValue"> <![CDATA[false]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <dynamic-element dataType="boolean" indexType="keyword" localizable="true" name="blnShowHowToApply" readOnly="false" repeatable="false" required="false" showLabel="true" type="checkbox" width=""> <meta-data locale="en_US"> <entry name="label"> <![CDATA[Show 'How to Apply' Tab]]> </entry> <entry name="predefinedValue"> <![CDATA[false]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <dynamic-element dataType="string" indexType="keyword" localizable="true" name="txtNqfLevel" readOnly="false" repeatable="false" required="false" showLabel="true" type="text" width="small"> <meta-data locale="en_US"> <entry name="label"> <![CDATA[NQF Level]]> </entry> <entry name="predefinedValue"> <![CDATA[]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <dynamic-element dataType="string" indexType="keyword" localizable="true" name="txtSaqaNumber" readOnly="false" repeatable="false" required="false" showLabel="true" type="text" width="small"> <meta-data locale="en_US"> <entry name="label"> <![CDATA[SAQA Number]]> </entry> <entry name="predefinedValue"> <![CDATA[]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <dynamic-element dataType="document-library" fieldNamespace="ddm" indexType="keyword" localizable="true" name="docBanner" readOnly="false" repeatable="false" required="false" showLabel="true" type="ddm-documentlibrary" width=""> <meta-data locale="en_US"> <entry name="label"> <![CDATA[Course Banner]]> </entry> <entry name="predefinedValue"> <![CDATA[]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <dynamic-element dataType="string" indexType="keyword" localizable="true" name="txtActivePageBreadcrumb" readOnly="false" repeatable="false" required="false" showLabel="true" type="text" width="small"> <dynamic-element dataType="string" indexType="keyword" localizable="true" name="txtBreadcrumbTitle" readOnly="false" repeatable="true" required="false" showLabel="true" type="text" width="small"> <dynamic-element dataType="link-to-page" fieldNamespace="ddm" indexType="keyword" localizable="true" name="linkPageBreadcrumb" readOnly="false" repeatable="false" required="false" showLabel="true" type="ddm-link-to-page" width="small"> <meta-data locale="en_US"> <entry name="label"> <![CDATA[Breadcrumb Link to Page]]> </entry> <entry name="predefinedValue"> <![CDATA[]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <meta-data locale="en_US"> <entry name="label"> <![CDATA[Breadcrumb Title]]> </entry> <entry name="predefinedValue"> <![CDATA[]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <meta-data locale="en_US"> <entry name="label"> <![CDATA[Active Page Breadcrumb Title]]> </entry> <entry name="predefinedValue"> <![CDATA[]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <dynamic-element dataType="string" indexType="keyword" localizable="true" name="txtTabularContentHeading" readOnly="false" repeatable="false" required="false" showLabel="true" type="text" width="small"> <dynamic-element dataType="string" indexType="keyword" localizable="true" name="txtLabel" readOnly="false" repeatable="true" required="false" showLabel="true" type="text" width="small"> <dynamic-element dataType="string" indexType="keyword" localizable="true" name="txtValue" readOnly="false" repeatable="false" required="false" showLabel="true" type="text" width="small"> <meta-data locale="en_US"> <entry name="label"> <![CDATA[Value]]> </entry> <entry name="predefinedValue"> <![CDATA[]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <meta-data locale="en_US"> <entry name="label"> <![CDATA[Label]]> </entry> <entry name="predefinedValue"> <![CDATA[]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <meta-data locale="en_US"> <entry name="label"> <![CDATA[Tabular Content Heading]]> </entry> <entry name="predefinedValue"> <![CDATA[Key dates]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <dynamic-element dataType="string" indexType="keyword" localizable="true" name="txtDownloadLinksHeading" readOnly="false" repeatable="false" required="false" showLabel="true" type="text" width="small"> <dynamic-element dataType="string" indexType="keyword" localizable="true" name="txtDownloadableLabel" readOnly="false" repeatable="true" required="false" showLabel="true" type="text" width="small"> <dynamic-element dataType="document-library" fieldNamespace="ddm" indexType="keyword" localizable="true" name="docDownloadable" readOnly="false" repeatable="false" required="false" showLabel="true" type="ddm-documentlibrary" width=""> <meta-data locale="en_US"> <entry name="label"> <![CDATA[Documents and Media]]> </entry> <entry name="predefinedValue"> <![CDATA[]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <dynamic-element dataType="string" indexType="keyword" localizable="true" name="txtExternalLink" readOnly="false" repeatable="false" required="false" showLabel="true" type="text" width="small"> <meta-data locale="en_US"> <entry name="label"> <![CDATA[External Link]]> </entry> <entry name="predefinedValue"> <![CDATA[]]> </entry> <entry name="tip"> <![CDATA[If an external link is specified, the Documents and Media value is ignored]]> </entry> </meta-data> </dynamic-element> <dynamic-element dataType="boolean" indexType="keyword" localizable="true" name="blnNewWindow" readOnly="false" repeatable="false" required="false" showLabel="true" type="checkbox" width=""> <meta-data locale="en_US"> <entry name="label"> <![CDATA[Open in new window]]> </entry> <entry name="predefinedValue"> <![CDATA[true]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <meta-data locale="en_US"> <entry name="label"> <![CDATA[Downloadable Document]]> </entry> <entry name="predefinedValue"> <![CDATA[]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic-element> <meta-data locale="en_US"> <entry name="label"> <![CDATA[Download Links Heading]]> </entry> <entry name="predefinedValue"> <![CDATA[]]> </entry> <entry name="tip"> <![CDATA[Leave this blank if you don't need a heading]]> </entry> </meta-data> </dynamic-element></root> Please sign in to reply. Reply as... Cancel Armando Ramirez Javeed Chida 7 Years Ago thank you for your answer, I need something like this:https://s17.postimg.org/qb7gjwngf/busqueda_Truqueada.png Please sign in to reply. Reply as... Cancel Armando Ramirez Armando Ramirez 7 Years Ago Basically I try to add styles to the results in a search Please sign in to reply. Reply as... Cancel Javeed Chida Armando Ramirez 7 Years Ago - Edited Ah! So, then what you need is to write a JSP hook to replace the code running under /webapps/ROOT/html/portlet/search/You may have to tweak one or more of the jspf fragments in that folder. As a quick experiment, try tweaking those files to see how your search results get altered. Lifeary's documentation on hooks is here:https://www.liferay.com/documentation/liferay-portal/6.0/development/-/ai/overriding-a-jsp?_ga=1.75370449.2126301223.1479500233Keep in mind that my approach to locating the display logic for each search result in a content template is just one idea. I did that because each search result is guaranteed to be a content item of type course (for my business requirements). if you're getting various types of content back, then you need to think afresh on how best to achieve that separation. In essence, however, it all comes down to the code you put in your JSP hook to replace the existing search results functionality.Hope that helps. And good luck! Please sign in to reply. Reply as... Cancel
Armando Ramirez Javeed Chida 7 Years Ago thank you for your answer, I need something like this:https://s17.postimg.org/qb7gjwngf/busqueda_Truqueada.png Please sign in to reply. Reply as... Cancel Armando Ramirez Armando Ramirez 7 Years Ago Basically I try to add styles to the results in a search Please sign in to reply. Reply as... Cancel Javeed Chida Armando Ramirez 7 Years Ago - Edited Ah! So, then what you need is to write a JSP hook to replace the code running under /webapps/ROOT/html/portlet/search/You may have to tweak one or more of the jspf fragments in that folder. As a quick experiment, try tweaking those files to see how your search results get altered. Lifeary's documentation on hooks is here:https://www.liferay.com/documentation/liferay-portal/6.0/development/-/ai/overriding-a-jsp?_ga=1.75370449.2126301223.1479500233Keep in mind that my approach to locating the display logic for each search result in a content template is just one idea. I did that because each search result is guaranteed to be a content item of type course (for my business requirements). if you're getting various types of content back, then you need to think afresh on how best to achieve that separation. In essence, however, it all comes down to the code you put in your JSP hook to replace the existing search results functionality.Hope that helps. And good luck! Please sign in to reply. Reply as... Cancel
Armando Ramirez Armando Ramirez 7 Years Ago Basically I try to add styles to the results in a search Please sign in to reply. Reply as... Cancel Javeed Chida Armando Ramirez 7 Years Ago - Edited Ah! So, then what you need is to write a JSP hook to replace the code running under /webapps/ROOT/html/portlet/search/You may have to tweak one or more of the jspf fragments in that folder. As a quick experiment, try tweaking those files to see how your search results get altered. Lifeary's documentation on hooks is here:https://www.liferay.com/documentation/liferay-portal/6.0/development/-/ai/overriding-a-jsp?_ga=1.75370449.2126301223.1479500233Keep in mind that my approach to locating the display logic for each search result in a content template is just one idea. I did that because each search result is guaranteed to be a content item of type course (for my business requirements). if you're getting various types of content back, then you need to think afresh on how best to achieve that separation. In essence, however, it all comes down to the code you put in your JSP hook to replace the existing search results functionality.Hope that helps. And good luck! Please sign in to reply. Reply as... Cancel
Javeed Chida Armando Ramirez 7 Years Ago - Edited Ah! So, then what you need is to write a JSP hook to replace the code running under /webapps/ROOT/html/portlet/search/You may have to tweak one or more of the jspf fragments in that folder. As a quick experiment, try tweaking those files to see how your search results get altered. Lifeary's documentation on hooks is here:https://www.liferay.com/documentation/liferay-portal/6.0/development/-/ai/overriding-a-jsp?_ga=1.75370449.2126301223.1479500233Keep in mind that my approach to locating the display logic for each search result in a content template is just one idea. I did that because each search result is guaranteed to be a content item of type course (for my business requirements). if you're getting various types of content back, then you need to think afresh on how best to achieve that separation. In essence, however, it all comes down to the code you put in your JSP hook to replace the existing search results functionality.Hope that helps. And good luck! Please sign in to reply. Reply as... Cancel
Javeed Chida Armando Ramirez 7 Years Ago Unfortunately not. I was only sharing the approach I adopted. The project is managed within our dev team. Please sign in to reply. Reply as... Cancel Srinivas P Javeed Chida 5 Years Ago Hi All, I want show the bookmark entry on top in search result, when I enter any content in search if that content related bookmark is available. Can any help me out. How to achieve it in Liferay DXP. Please sign in to reply. Reply as... Cancel
Srinivas P Javeed Chida 5 Years Ago Hi All, I want show the bookmark entry on top in search result, when I enter any content in search if that content related bookmark is available. Can any help me out. How to achieve it in Liferay DXP. Please sign in to reply. Reply as... Cancel