11

Experts,

I want to develop a GUI Extension, in which I want to place a search box above the Publications list as shown in the attached image. It is to introduce a instant(responsive) search over the publication list under it.

My question is, which resource should I extend to add my search block above the publication list?

enter image description here

5
  • 1
    not related to your question, Usually i use ctrl + F and search the publication by typing name, it works great for me.
    – Raj Kumar
    Aug 20 '15 at 6:45
  • Yeah, that's the normal practice. But I want to avoid the use of mouse (scrolling). So if I have some 500 publications and do CTRL+F, It may highlight more than one publications as the search string can belong to many publications. Now again, I need to scroll to find highlighted publications. Aug 20 '15 at 9:11
  • Depending on the browser, enter or a "next" arrow removes the need to mouse scroll. This would still be a nice extension--I'd recommend adding it to Tridion Ideas.
    – Alvin Reyes
    Aug 20 '15 at 22:44
  • Also consider Publication Types to let users filter that list--a few types could reduce several hundred publications to a few dozen at-a-time.
    – Alvin Reyes
    Aug 20 '15 at 22:48
  • Publication Types filter is OOTB from Tridion, there is a "funnel" icon in front of label "Publications". Aug 26 '15 at 16:52
5

I think you could extend the DashboardView.

In your extension js you can acces the tree this way:

$models.getNavigator().getTreeControl()

If you are testing with tridion 2013 in Chrome or firefox developer console I think you should use:

window.top.frames[0].$models.getNavigator().getTreeControl()
6

With the help of answers from @UI Beardcore and @Julián Hernández, I created a Alchemy Plugin called Publication Panel Search for this.

Below are the steps I did:

  1. Extended dashboard

  2. On dashboard load event, get the tree control by var treeControl = $display.getView().getTreeControl();

  3. Add event handler function "AddSearchBox" on "Draw" event of the tree control. like: $evt.addEventHandler(treeControl, "draw", addSearchBox); where addSearchBox function is responsible to add the search box.

The full code for this plugin could be found here on GitHub and it could be downloaded and installed from Alchemy Web Store.

4

I did a quick inspection and i see a couple of divs with the IDs 'DashBoardTree' & ' PublicationsPanel' i'd have a sniff around SDL's own files to see what you can dig up.

Half answer, i should have made it a comment, but i've not had points for a while and i'm hungry !

3
  • 1
    you should have got some points now for your suggestion :P Aug 21 '15 at 9:11
  • 1
    Do half answers get half up votes?
    – Alvin Reyes
    Aug 25 '15 at 22:34
  • given you an upvote on the comment @AlvinReyes
    – johnwinter
    Sep 4 '15 at 17:35
4

If I were doing this functionality, I`d have started with extending the filtered tree control itself:

  1. Add setting to indicate if search form should be initialized
  2. Extend draw method to render this form
  3. Make this section smart-enough to manage the text inside and handle its change events
  4. Extend dashboard view to pass the setting to render this tree section.
  5. Subscribe on search box change event to reflect search parameter changes and set the filter to tree.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.