Hello,
I did what you've said about the PrettyName and it works.
Thanks a lot Eduard it rally helps.
And about the links i did it with out touching the suggest.js file. I just
used JavaScript with : xwiki:suggest:selected to redirect with the URL in
the result info.
_________________
Cordialement
Mohamed AYED
Élevé ingénieur en Système d'Information Mobile (SIM) a ESPRIT.
Stagiaire a l'ESTIA (Ecole Supérieure des Technologies Industrielles
Avancées).
Tél : +33 (0)7 71 62 91 04
2015-12-09 13:26 GMT+01:00 Eduard Moraru <enygma2002(a)gmail.com>om>:
Hi,
Well, as you see in the code of the example "DevGuide.SuggestService"
suggestion service, when building the results, you could do:
#set($resultDocPrettyName = $resultDoc.plainTitle)
and then return results in the form:
<rs id="1"
info="$resultDocURL">$resultDocPrettyName</rs>
Regarding the display of the suggestions in the list, making them links
instead of text does not make much sense to me, but if you really want to
do it, I guess you could override the "createItemDisplay" [1] method in
suggest.js, either at rutine, or in the actual file on your server.
Hope this helps,
Eduard
----------
[1]
https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwi…
On Thu, Dec 3, 2015 at 3:59 PM, MohamedAyed <mohamedayeed(a)gmail.com>
wrote:
Hello everyone,
I've created a form which used the "Suggest Widget" extension for fields.
I've been able to make the code from the Autosuggest widget work, which
can
be found in this tutorial
<http://platform.xwiki.org/xwiki/bin/view/DevGuide/AutoSuggestWidget> .
I'm trying to show the pages prettyName instead of the pages FullName and
also i want to make the suggestion to be links not just a simple text.
Has someone already done this before or can help me out with this ?
Thank you
Much appreciated,
--
View this message in context:
http://xwiki.475771.n2.nabble.com/Suggest-Widget-tp7597080.html
Sent from the XWiki- Dev mailing list archive at
Nabble.com.
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs