[opencms-dev] Getting the "add new content" direct edit icon in empty collector / getCreateLink
Alexander Fritz
afritz at arcor.de
Fri Sep 26 14:49:30 CEST 2008
Hello everyone,
I miss the green "+" direct edit icon in a collector (created with the
cms:contentload tag)
that does not contain any items yet.
Anyone found a solution how to get that icon show up anyway?
I tried to work around it by getting the link that lets the Direct Edit
User create
a new XML Content:
org.opencms.file.collectors.I_CmsResourceCollector collector =
org.opencms.main.OpenCms.getResourceManager().getContentCollector("allInFolderPriorityDateDesc");
String newLink = collector.getCreateLink(cms,
"allInFolderPriorityDateDesc",
"${request.folder}article_${number}.html|article");
However, it will in any case result the String "/article_0001.html", no
matter if and how
many of the XML-Contents are in the folder yet.
I don't understand why I am getting such a return value as getCreateLink
is documented like:
"Returns the link that must be executed when a user clicks on the direct
edit "new" button on
a list created by the named collector."
I am using OpenCms 7.0.4.
Best Regards
Alex
More information about the opencms-dev
mailing list