11-12-2016 07:45 PM
I have this problem with customizing the aikau search placeholder. I've created a share amp with maven and setting the extension like this to extend the SearchBox widget:
<extension>
<modules>
<module>
<id>Aikau SearchBox Customization</id>
<version>1.0</version>
<auto-deploy>true</auto-deploy>
<configurations>
<config evaluator="string-compare" condition="WebFramework" replace="false">
<web-framework>
<dojo-pages>
<packages>
<package name="header" location="js/header"/>
</packages>
</dojo-pages>
</web-framework>
</config>
</configurations>
</module>
</modules>
</extension>
with the structure in META-INF:
▾ js/
▾ header/
▾ i18n/
SearchBox.properties
SearchBox.js
having SearchBox.js:
define(["dojo/_base/declare", "alfresco/header/SearchBox"],
function(declare, SearchBox) {
return declare([SearchBox], {
i18nRequirements: [ {i18nFile: "./i18n/SearchBox.properties"} ],
});
});
and the properties file:
search.instruction=he who seeks shall find, Seek and ye shall find
Any idea why the properties is not overridden?
[edit]
Never mind..I just find it out. Last time I was searching this aikau didn't allow to override the placeholder but this is been added! Thanks Dave Draper !
No need now to extend the widget but it's enough to set a customization extension and modify like:
var searchBox = widgetUtils.findObject(model.jsonModel.widgets, "id", "HEADER_SEARCH");
searchBox.config.placeholder= "search-custom.label";
11-14-2016 05:06 AM
Glad you were able to resolve the problem! Let me know if there are any other issues I can help with.
01-19-2017 08:49 AM
Hi,
I followed this search custom properties? and was able to remove the people suggestion from the live-search.
I have put in summaries way in Modify live search in Alfresco Commmunity 5.0.d - Stack Overflow but I'm still trying to find way to override the placeholder in search box.
If any idea then please let me know.
Thanks.
01-19-2017 09:30 AM
Hi,
For the placeholder you have two ways and it depends on the aikau version. If the aikau version is sufficiently new, you can use the method I've explained (just setting the property as you were trying to do for the showPeopleResults. If it's an older version of aikau you will have to override with an extension. WIth this method I was never able to be successful.
HTH
01-19-2017 11:21 AM
Thank you!
I updated the aikau from 1.0.8 to 1.0.101 (very big difference ) but placeholder changed and it worked well. Although I need to do a through testing of the system in case anything is broken.
Also if you have any idea that this upgrading to 1.0.101 is good for Alfresco community 5.0.d ? or should I use 1.0.10 or any other version for safer side?
Thanks again.
01-19-2017 03:09 PM
Glad it solved your problem
Actually you can use latest version of aikau, it has been made in that way so it's possible to upgrade it separately from Alfresco.
01-19-2017 09:26 AM
I have share-header.get.js with following code:
if (!user.isAdmin)
{
widgetUtils.deleteObjectFromArray(model.jsonModel, "id", "HEADER_REPOSITORY");
}
var searchBox = widgetUtils.findObject(model.jsonModel.widgets, "id", "HEADER_SEARCH");
searchBox.config.placeholder= "test";
But nothing is changed and placeholder of search box is old one.
How to change the placeholder in search input?
Thanks.
12-13-2017 05:41 PM
I cannot customize the default text in the searchbox by creating an amp that works. I am using the latest version of Aikau and have the enterprise version of Alfresco. I tried all the suggestions above but I must be missing something for nothing works.
I tried this -
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.