Hi. It is seen that Panel items can be hidden from users other than the Admins using this statement -> #if ($xwiki.hasAdminRights()), right ? Is it possible to be able to display certain Panel items to certain user groups ? If so, how ? Harikrishnan -- View this message in context: http://www.nabble.com/Displaying-Panel-items-tf4749669.html#a13581426 Sent from the XWiki- Users mailing list archive at Nabble.com.
Hi, it is possible. Instead of checking if the current user has administrator rights, you can check if he is in the group you want. There was a discussion about that some days ago on the mailing list. Look for it, if I remember right there was also the code you need. Vito V. Harikrishnan Nair wrote:
Hi.
It is seen that Panel items can be hidden from users other than the Admins using this statement -> #if ($xwiki.hasAdminRights()), right ?
Is it possible to be able to display certain Panel items to certain user groups ? If so, how ?
Harikrishnan
-- Vitantonio Messa +358 46 889 48 49 - [email protected] COSS - The Finnish Centre for Open Source Solutions @ Technology Centre Hermia Ltd. Hermiankatu 1, FIN-33720 Tampere, FINLAND
Vitantonio Messa wrote:
Hi,
it is possible. Instead of checking if the current user has administrator rights, you can check if he is in the group you want.
There was a discussion about that some days ago on the mailing list. Look for it, if I remember right there was also the code you need.
Vito
V. Harikrishnan Nair wrote:
Hi.
It is seen that Panel items can be hidden from users other than the Admins using this statement -> #if ($xwiki.hasAdminRights()), right ?
Is it possible to be able to display certain Panel items to certain user groups ? If so, how ?
Harikrishnan
Just to ease the task. To show/hide a panel for the current user: #set ($user = $xwiki.getUser()) #if($user.isUserInGroup("XWiki.YourGroup")) ... #end HTH, -- Ricardo Rodríguez Your XEN ICT Team
hi Vito, hi Ricardo, I implemented the code as : #set($user = $xwiki.getUser()) #if($user.isUserInGroup('XWiki.Editors')) Editor Group * [Editor's page>Amrita IIS.Editor] #end But I got a really weird error - Error number 4001 in 4: Error while parsing velocity page Panels.QuickLinks Wrapped Exception: Encountered "#endrn" at line 26, column 1 of Panels.QuickLinks Was expecting one of: <EOF> "(" … <RPAREN> … <ESCAPE_DIRECTIVE> … <SET_DIRECTIVE> … "##" … "\" … " " … <TEXT> … "#" … "#" … <STRING_LITERAL> … <IF_DIRECTIVE> … <STOP_DIRECTIVE> … <INTEGER_LITERAL> … <FLOATING_POINT_LITERAL> … <WORD> … <BRACKETED_WORD> … <IDENTIFIER> … <DOT> … "{" … "}" ... I checked everything but it simply would not work... - Harikrishnan Ricardo Rodríguez wrote:
Vitantonio Messa wrote:
Hi,
it is possible. Instead of checking if the current user has administrator rights, you can check if he is in the group you want.
There was a discussion about that some days ago on the mailing list. Look for it, if I remember right there was also the code you need.
Vito
V. Harikrishnan Nair wrote:
Hi.
It is seen that Panel items can be hidden from users other than the Admins using this statement -> #if ($xwiki.hasAdminRights()), right ?
Is it possible to be able to display certain Panel items to certain user groups ? If so, how ?
Harikrishnan
Just to ease the task. To show/hide a panel for the current user:
#set ($user = $xwiki.getUser()) #if($user.isUserInGroup("XWiki.YourGroup")) ... #end
HTH,
-- Ricardo Rodríguez Your XEN ICT Team
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
-- View this message in context: http://www.nabble.com/Displaying-Panel-items-tf4749669.html#a13592796 Sent from the XWiki- Users mailing list archive at Nabble.com.
V. Harikrishnan Nair wrote:
hi Vito, hi Ricardo,
I implemented the code as :
#set($user = $xwiki.getUser()) #if($user.isUserInGroup('XWiki.Editors')) Editor Group * [Editor's page>Amrita IIS.Editor] #end
But I got a really weird error -
Error number 4001 in 4: Error while parsing velocity page Panels.QuickLinks Wrapped Exception: Encountered "#endrn" at line 26, column 1 of Panels.QuickLinks Was expecting one of: <EOF> "(" … <RPAREN> … <ESCAPE_DIRECTIVE> … <SET_DIRECTIVE> … "##" … "\" … " " … <TEXT> … "#" … "#" … <STRING_LITERAL> … <IF_DIRECTIVE> … <STOP_DIRECTIVE> … <INTEGER_LITERAL> … <FLOATING_POINT_LITERAL> … <WORD> … <BRACKETED_WORD> … <IDENTIFIER> … <DOT> … "{" … "}" ...
I checked everything but it simply would not work...
- Harikrishnan
Hi Harikrishnan, I've tried your code here and it works without a glitch. The error you get is at line 26, so it is not possible for us to know if one of the five code lines included in your message is the offending one. Please, could you post here your whole Panels.QuickLinks to see if it is possible for us to reproduce the error? Best, -- Ricardo Rodríguez Your XEN ICT Team
Thanks for the help, Ricardo. Here's the code - --- #panelheader('Quick Links') * [Home>Amrita IIS.WebHome] * [PMT Discussions>Amrita IIS.PMT_Discussions] * [Class Editor>XWiki.XWikiClasses] * [PMT>PMT.PMTemplateTestClass] * [PMT Test form>Amrita IIS.Form_PMT_Test] #if ($xwiki.hasAdminRights()) For Admins: * [Admin Center>XWiki.WebHome] * [What's New>Main.Dashboard] $xwiki.getURL( $xwiki.getSkinFile('icons/black-rss-mini3.png') #end #set($user = $xwiki.getUser()) #if($user.isUserInGroup("XWiki.Editors")) Editor Group * [Editor's page>Amrita IIS.Editor] #end <p style="font-size:0.75em;padding-left:8px;"> $xwiki.getDocument( (Edit this panel) </p> #end #panelfooter() --- Ricardo Rodríguez wrote:
V. Harikrishnan Nair wrote:
hi Vito, hi Ricardo,
I implemented the code as :
#set($user = $xwiki.getUser()) #if($user.isUserInGroup('XWiki.Editors')) Editor Group * [Editor's page>Amrita IIS.Editor] #end
But I got a really weird error -
Error number 4001 in 4: Error while parsing velocity page Panels.QuickLinks Wrapped Exception: Encountered "#endrn" at line 26, column 1 of Panels.QuickLinks Was expecting one of: <EOF> "(" … <RPAREN> … <ESCAPE_DIRECTIVE> … <SET_DIRECTIVE> … "##" … "\" … " " … <TEXT> … "#" … "#" … <STRING_LITERAL> … <IF_DIRECTIVE> … <STOP_DIRECTIVE> … <INTEGER_LITERAL> … <FLOATING_POINT_LITERAL> … <WORD> … <BRACKETED_WORD> … <IDENTIFIER> … <DOT> … "{" … "}" ...
I checked everything but it simply would not work...
- Harikrishnan
Hi Harikrishnan,
I've tried your code here and it works without a glitch.
The error you get is at line 26, so it is not possible for us to know if one of the five code lines included in your message is the offending one.
Please, could you post here your whole Panels.QuickLinks to see if it is possible for us to reproduce the error?
Best,
-- Ricardo Rodríguez Your XEN ICT Team
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
-- View this message in context: http://www.nabble.com/Displaying-Panel-items-tf4749669.html#a13600550 Sent from the XWiki- Users mailing list archive at Nabble.com.
Hi, Has anyone experienced this problem or does anyone know what could be wrong when creating classes? I need to create 2 classes 1 for a virtual instance and 1 for a second blog in my xwiki. I'm getting this error which I am posting at the bottom. Thank you in advance, Tim
I forgot to paste the error. Error number 4001 in 4: Error while parsing velocity page XWiki.BlogArticle Wrapped Exception: Invocation of method 'substring' in class java.lang.String threw exception java.lang.StringIndexOutOfBoundsException: String index out of range: -1 @ XWiki.BlogArticle4,26? <https://wmail.wssu.edu/xwiki/bin/edit/XWiki/4%2C26?parent=XWiki.BlogArticle&editor=wysiwyg> com.xpn.xwiki.XWikiException: Error number 4001 in 4: Error while parsing velocity page XWiki.BlogArticle Wrapped Exception: Invocation of method 'substring' in class java.lang.String threw exception java.lang.StringIndexOutOfBoundsException: String index out of range: -1 @ XWiki.BlogArticle4,26? <https://wmail.wssu.edu/xwiki/bin/edit/XWiki/4%2C26?parent=XWiki.BlogArticle&editor=wysiwyg> at com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:148) at com.xpn.xwiki.render.XWikiVelocityRenderer.render(XWikiVelocityRenderer.java:91) at com.xpn.xwiki.render.DefaultXWikiRenderingEngine.renderText(DefaultXWikiRenderingEngine.java:222) at com.xpn.xwiki.render.DefaultXWikiRenderingEngine.renderText(DefaultXWikiRenderingEngine.java:154) at com.xpn.xwiki.render.DefaultXWikiRenderingEngine.renderText(DefaultXWikiRenderingEngine.java:125) at com.xpn.xwiki.render.DefaultXWikiRenderingEngine.renderDocument(DefaultXWikiRenderingEngine.java:117) at com.xpn.xwiki.doc.XWikiDocument.getRenderedContent(XWikiDocument.java:401) at com.xpn.xwiki.api.Document.getRenderedContent(Document.java:347) at sun.reflect.GeneratedMethodAccessor165.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:295) at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:245) at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:203) at org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:294) at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:74) at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318) at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:107) at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318) at com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:240) at com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:143) at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:1275) at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:1244) at com.xpn.xwiki.api.XWiki.parseTemplate(XWiki.java:552) at sun.reflect.GeneratedMethodAccessor49.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:295) at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:245) at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:203) at org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:294) at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318) at org.apache.velocity.runtime.directive.VelocimacroProxy.render(VelocimacroProxy.java:194) at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:170) at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318) at com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:240) at com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:143) at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:1275) at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:1244) at com.xpn.xwiki.web.Utils.parseTemplate(Utils.java:94) at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:157) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432) at javax.servlet.http.HttpServlet.service(HttpServlet.java:710) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:117) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689) at java.lang.Thread.run(Unknown Source) Wrapped Exception: java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.String.substring(Unknown Source) at sun.reflect.GeneratedMethodAccessor148.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:295) at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:245) at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:203) at org.apache.velocity.runtime.parser.node.ASTReference.value(ASTReference.java:419) at org.apache.velocity.runtime.parser.node.ASTExpression.value(ASTExpression.java:73) at org.apache.velocity.runtime.parser.node.ASTSetDirective.render(ASTSetDirective.java:125) at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318) at com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:240) at com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:143) at com.xpn.xwiki.render.XWikiVelocityRenderer.render(XWikiVelocityRenderer.java:91) at com.xpn.xwiki.render.DefaultXWikiRenderingEngine.renderText(DefaultXWikiRenderingEngine.java:222) at com.xpn.xwiki.render.DefaultXWikiRenderingEngine.renderText(DefaultXWikiRenderingEngine.java:154) at com.xpn.xwiki.render.DefaultXWikiRenderingEngine.renderText(DefaultXWikiRenderingEngine.java:125) at com.xpn.xwiki.render.DefaultXWikiRenderingEngine.renderDocument(DefaultXWikiRenderingEngine.java:117) at com.xpn.xwiki.doc.XWikiDocument.getRenderedContent(XWikiDocument.java:401) at com.xpn.xwiki.api.Document.getRenderedContent(Document.java:347) at sun.reflect.GeneratedMethodAccessor165.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:295) at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:245) at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:203) at org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:294) at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:74) at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318) at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:107) at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318) at com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:240) at com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:143) at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:1275) at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:1244) at com.xpn.xwiki.api.XWiki.parseTemplate(XWiki.java:552) at sun.reflect.GeneratedMethodAccessor49.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:295) at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:245) at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:203) at org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:294) at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318) at org.apache.velocity.runtime.directive.VelocimacroProxy.render(VelocimacroProxy.java:194) at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:170) at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318) at com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:240) at com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:143) at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:1275) at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:1244) at com.xpn.xwiki.web.Utils.parseTemplate(Utils.java:94) at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:157) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432) at javax.servlet.http.HttpServlet.service(HttpServlet.java:710) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:117) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689) at java.lang.Thread.run(Unknown Source) ________________________________ From: [email protected] on behalf of Campbell, Timothy D Sent: Mon 11/5/2007 11:20 PM To: XWiki Users Subject: Error when creating Classes Hi, Has anyone experienced this problem or does anyone know what could be wrong when creating classes? I need to create 2 classes 1 for a virtual instance and 1 for a second blog in my xwiki. I'm getting this error which I am posting at the bottom. Thank you in advance, Tim
You're in the wrong thread, Tim... I think you should send this as a new post. Campbell, Timothy D wrote:
Hi, Has anyone experienced this problem or does anyone know what could be wrong when creating classes? I need to create 2 classes 1 for a virtual instance and 1 for a second blog in my xwiki. I'm getting this error which I am posting at the bottom.
Thank you in advance, Tim
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
-- View this message in context: http://www.nabble.com/Displaying-Panel-items-tf4749669.html#a13600912 Sent from the XWiki- Users mailing list archive at Nabble.com.
V. Harikrishnan Nair wrote:
Thanks for the help, Ricardo. Here's the code - --- #panelheader('Quick Links') * [Home>Amrita IIS.WebHome] * [PMT Discussions>Amrita IIS.PMT_Discussions] * [Class Editor>XWiki.XWikiClasses] * [PMT>PMT.PMTemplateTestClass] * [PMT Test form>Amrita IIS.Form_PMT_Test]
#if ($xwiki.hasAdminRights()) For Admins: * [Admin Center>XWiki.WebHome] * [What's New>Main.Dashboard] $xwiki.getURL( $xwiki.getSkinFile('icons/black-rss-mini3.png') #end
#set($user = $xwiki.getUser()) #if($user.isUserInGroup("XWiki.Editors")) Editor Group * [Editor's page>Amrita IIS.Editor] #end
<p style="font-size:0.75em;padding-left:8px;"> $xwiki.getDocument( (Edit this panel) </p> #end #panelfooter()
---
Ricardo Rodríguez wrote:
V. Harikrishnan Nair wrote:
hi Vito, hi Ricardo,
I implemented the code as :
#set($user = $xwiki.getUser()) #if($user.isUserInGroup('XWiki.Editors')) Editor Group * [Editor's page>Amrita IIS.Editor] #end
But I got a really weird error -
Error number 4001 in 4: Error while parsing velocity page Panels.QuickLinks Wrapped Exception: Encountered "#endrn" at line 26, column 1 of Panels.QuickLinks Was expecting one of: <EOF> "(" … <RPAREN> … <ESCAPE_DIRECTIVE> … <SET_DIRECTIVE> … "##" … "\" … " " … <TEXT> … "#" … "#" … <STRING_LITERAL> … <IF_DIRECTIVE> … <STOP_DIRECTIVE> … <INTEGER_LITERAL> … <FLOATING_POINT_LITERAL> … <WORD> … <BRACKETED_WORD> … <IDENTIFIER> … <DOT> … "{" … "}" ...
I checked everything but it simply would not work...
- Harikrishnan Hi Harikrishnan,
I've tried your code here and it works without a glitch.
The error you get is at line 26, so it is not possible for us to know if one of the five code lines included in your message is the offending one.
Please, could you post here your whole Panels.QuickLinks to see if it is possible for us to reproduce the error?
Best,
-- Ricardo Rodríguez Your XEN ICT Team
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
Hi Harikrishnan, the problem is in the last "#end": there no "#if" related to it. Try to delete it and the panel should work fine. Vito -- Vitantonio Messa +358 46 889 48 49 - [email protected] COSS - The Finnish Centre for Open Source Solutions @ Technology Centre Hermia Ltd. Hermiankatu 1, FIN-33720 Tampere, FINLAND
That's perfect ! Thanks, Vito, I should've noticed that... Vitantonio Messa wrote:
V. Harikrishnan Nair wrote:
Thanks for the help, Ricardo. Here's the code - --- #panelheader('Quick Links') * [Home>Amrita IIS.WebHome] * [PMT Discussions>Amrita IIS.PMT_Discussions] * [Class Editor>XWiki.XWikiClasses] * [PMT>PMT.PMTemplateTestClass] * [PMT Test form>Amrita IIS.Form_PMT_Test]
#if ($xwiki.hasAdminRights()) For Admins: * [Admin Center>XWiki.WebHome] * [What's New>Main.Dashboard] $xwiki.getURL( $xwiki.getSkinFile('icons/black-rss-mini3.png') #end
#set($user = $xwiki.getUser()) #if($user.isUserInGroup("XWiki.Editors")) Editor Group * [Editor's page>Amrita IIS.Editor] #end
<p style="font-size:0.75em;padding-left:8px;"> $xwiki.getDocument( (Edit this panel) </p> #end #panelfooter()
---
Ricardo Rodríguez wrote:
V. Harikrishnan Nair wrote:
hi Vito, hi Ricardo,
I implemented the code as :
#set($user = $xwiki.getUser()) #if($user.isUserInGroup('XWiki.Editors')) Editor Group * [Editor's page>Amrita IIS.Editor] #end
But I got a really weird error -
Error number 4001 in 4: Error while parsing velocity page Panels.QuickLinks Wrapped Exception: Encountered "#endrn" at line 26, column 1 of Panels.QuickLinks Was expecting one of: <EOF> "(" … <RPAREN> … <ESCAPE_DIRECTIVE> … <SET_DIRECTIVE> … "##" … "\" … " " … <TEXT> … "#" … "#" … <STRING_LITERAL> … <IF_DIRECTIVE> … <STOP_DIRECTIVE> … <INTEGER_LITERAL> … <FLOATING_POINT_LITERAL> … <WORD> … <BRACKETED_WORD> … <IDENTIFIER> … <DOT> … "{" … "}" ...
I checked everything but it simply would not work...
- Harikrishnan Hi Harikrishnan,
I've tried your code here and it works without a glitch.
The error you get is at line 26, so it is not possible for us to know if one of the five code lines included in your message is the offending one.
Please, could you post here your whole Panels.QuickLinks to see if it is possible for us to reproduce the error?
Best,
-- Ricardo Rodríguez Your XEN ICT Team
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
Hi Harikrishnan,
the problem is in the last "#end": there no "#if" related to it. Try to delete it and the panel should work fine.
Vito
-- Vitantonio Messa +358 46 889 48 49 - [email protected] COSS - The Finnish Centre for Open Source Solutions @ Technology Centre Hermia Ltd. Hermiankatu 1, FIN-33720 Tampere, FINLAND _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
-- View this message in context: http://www.nabble.com/Displaying-Panel-items-tf4749669.html#a13601636 Sent from the XWiki- Users mailing list archive at Nabble.com.
participants (4)
-
Campbell, Timothy D -
V. Harikrishnan Nair -
Vitantonio Messa -
Your XEN ICT Team - Ricardo Rodriguez