extjs - CQ custom content finder tab is not working properly -
i followed below steps add new tab in content finder retrieve article pages using "geometrixx-media/templates/media-article-page." template under /content/geometrixx-media
- created new node under /apps of type sling:folder (/apps/wcm/extensions/contentfinder).
- added below 2 properties new node(contentfinder) extensiongroup="tabs"contentfinder & extensiontype="contentfinder_extension"
- copied 1 of files (pages.js) in /libs/wcm/extensions/contentfinder folder /apps/wcm/extensions/contentfinder
- renamed aritles.js , changed "id" attribute , made below changes retrieve article pages of template type "geometrixx-media/templates/media-article-page."
script file location placed: /apps/wcm/extensions/contentfinder
file name: articles.js
code:
{ "tabtip": cq.i18n.getmessage("articles"), "id": "cftab-articles", "iconcls": "cq-cft-tab-icon pages", "xtype": "contentfindertab", "ranking": 11, "allowedpaths": [ "/content/*", "/etc/scaffolding/*", "/etc/workflow/packages/*" ], "items": [ cq.wcm.contentfindertab.getqueryboxconfig({ "id": "cftab-articles-querybox", "items": [ cq.wcm.contentfindertab.getsuggestfieldconfig({"url": "/bin/wcm/contentfinder/suggestions.json/content"}) ] }), cq.wcm.contentfindertab.getresultsboxconfig({ "itemsddgroups": [cq.wcm.editbase.dd_group_page], "items": { "tpl": '<tpl for=".">' + '<div class="cq-cft-search-item" title="{pathencoded}" ondblclick="cq.wcm.contentfinder.loadcontentwindow(\'{[cq.http.encodepath(values.path)]}.html\');">' + '<div class="cq-cft-search-thumb-top" style="background-image:url(\'{[cq.wcm.contentfindertab.thumbs_url(values, 48, 48)]}\');"></div>' + '<div class="cq-cft-search-text-wrapper">' + '<div class="cq-cft-search-title">{[cq.shared.xss.getxsstablepropertyvalue(values, \"title\")]}</div>' + '</div>' + '<div class="cq-cft-search-separator"></div>' + '</div>' + '</tpl>', "itemselector": cq.wcm.contentfindertab.details_itemselector }, "tbar": [ cq.wcm.contentfindertab.refresh_button ] },{ "url": "/bin/wcm/contentfinder/page/view.json/content/geometrixx-media" }, { "baseparams": { "type": "cq:page", "query": "\"cq:template\":\"geometrixx-media/templates/media-article-page\"" } }) ] }
now new tab(articles) tab getting added first time showing article pages if click on other tab , click on articles tab displaying pages(article pages , other pages also).
first time when clicked on articles tab showing below results:
if clicked on other tab(documents) , clicked on articles tab showing below results:
i have created custom content-finder tab per use-case display youtube videos in dam. blog can out. https://chanchal.wordpress.com/2013/06/26/how-to-add-your-own-content-finder-tab-in-cq5/
firstly, issue seems change ranking "ranking": 10,
may conflicting other should work,also clarity add custom icon "iconcls": "cq-cft-tab-icon *iconname(for me youtube)*",
might need set structure follows :
Comments
Post a Comment