[xwiki-devs] Find current mode of the document through Velocity
Hello All, Through Velocity, is it possible to find whether we are in the "Edit" mode of the document or "View" mode ? Actually, I wanted to make few changes in the content of the document when its in View mode. So if I could know the mode of the document, I could just use some if/else statement. Thanks in advance for the help. Manish -- View this message in context: http://xwiki.475771.n2.nabble.com/Find-current-mode-of-the-document-through-... Sent from the XWiki- Dev mailing list archive at Nabble.com.
Hey, a question I know ;) $xcontext.getAction() 'view' for view 'edit' for wiki or wysiwyg editor 'inline' for inline form editing. Caleb xManish wrote:
Hello All, Through Velocity, is it possible to find whether we are in the "Edit" mode of the document or "View" mode ?
Actually, I wanted to make few changes in the content of the document when its in View mode. So if I could know the mode of the document, I could just use some if/else statement.
Thanks in advance for the help.
Manish
Thankyou so much Caleb You just saved my day... :) -- View this message in context: http://xwiki.475771.n2.nabble.com/Find-current-mode-of-the-document-through-... Sent from the XWiki- Dev mailing list archive at Nabble.com.
participants (2)
-
Caleb James DeLisle -
xManish