Changing javascript Liferay functionality

I want to add some tags to the article. The problem is that the tags appear in the popup in a "random order". This is because they click on the page. I want to step in, sort the tags and submit their order. How would you do it? I've noticed methods in tags_entries_selector.js, but I'm not sure where to start.

0


a source to share


2 answers


The main idea of ​​the solution is to keep all tags in an array and not display anything until this array is "full". To understand when this will happen, compare the length of the array with vocabularies.length

. Make any necessary (non-trivial) modifications inside your custom array, convert its data to string and pass it to container.html()

.



The main thing to understand is that the function instance._getVocabularyEntries()

is executed for every record, but we want it to be executed only when our custom array has filled all the required data. This solution has the disadvantage that all necessary data must be retrieved before displaying anything to the user.

0


a source


There are two main ways to extend Liferay Portal:

  • Ext Environment
  • Hooks


Ext Environment is a powerful technique, but can be a little tricky. For interceptions you can look at: http://jdem.cz/bfms4

+1


a source







All Articles