Foros de discusión
Check if journal article has certain tag?
Gwowen Fu, modificado hace 11 años.
Check if journal article has certain tag?
Expert Mensajes: 315 Fecha de incorporación: 27/12/10 Mensajes recientes
Hi,
What's the easiest way to check if an article has a certain tag?
What I can think of now is to use AssetTagLocalServiceUtil.dynamicQuery(dynamicQuery) and the dynamicQuery involves few tables.
I wish there is a method like article.hasTag(tagName) exists.
Thanks!
Gwowen
What's the easiest way to check if an article has a certain tag?
What I can think of now is to use AssetTagLocalServiceUtil.dynamicQuery(dynamicQuery) and the dynamicQuery involves few tables.
I wish there is a method like article.hasTag(tagName) exists.
Thanks!
Gwowen
jelmer kuperus, modificado hace 11 años.
RE: Check if journal article has certain tag?
Liferay Legend Mensajes: 1191 Fecha de incorporación: 10/03/10 Mensajes recientesArrays.asList(AssetEntryLocalServiceUtil.getEntry(JournalArticle.class.getName(), id).getTagNames()).contains(yourTag);
Gwowen Fu, modificado hace 11 años.
RE: Check if journal article has certain tag?
Expert Mensajes: 315 Fecha de incorporación: 27/12/10 Mensajes recientesjelmer kuperus:
Arrays.asList(AssetEntryLocalServiceUtil.getEntry(JournalArticle.class.getName(), id).getTagNames()).contains(yourTag);
Thanks, this is indeed easier.