[xwiki-users] include search with parameters

2011-03-23 Thread Legeinfo
Hallo!
 
How to include a search like that in a page?
.../Main/Search?text=foo+bar
 
{{include document=Search?text=foo+bar/}}
does not do the job.
 
Volker


--
View this message in context: 
http://xwiki.475771.n2.nabble.com/include-search-with-parameters-tp6199809p6199809.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] include search with parameters

2011-03-23 Thread Thomas Mortagne
Include macro include content before it's executed by default so you
can't use that for your use case or at least not like that.

If you use context=new the content will be executed before it's
included but there is no support for parameters in include macro since
even in this case it does not execute like a browser either.

Depending of the page you are trying to include there could be
velocity variable you could set before the include context=new to
indicate what the page is supposed to do. You will have to look at
Search page source code to see if it can support it.

The only other way would be to replace the $request in the context to
set your own parameters but i doubt you can do that with public API
and it's hard to do in Velocity since you can't create new java
object.

You can of course write your own macro do support this use case. See
http://platform.xwiki.org/xwiki/bin/view/DevGuide/WritingMacros

On Wed, Mar 23, 2011 at 14:14, Legeinfo v...@legeinfo.net wrote:
 Hallo!

 How to include a search like that in a page?
 .../Main/Search?text=foo+bar

 {{include document=Search?text=foo+bar/}}
 does not do the job.

 Volker


 --
 View this message in context: 
 http://xwiki.475771.n2.nabble.com/include-search-with-parameters-tp6199809p6199809.html
 Sent from the XWiki- Users mailing list archive at Nabble.com.
 ___
 users mailing list
 users@xwiki.org
 http://lists.xwiki.org/mailman/listinfo/users




-- 
Thomas Mortagne
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] include search with parameters

2011-03-23 Thread Vincent Massol
We need a search wiki macro to include the result of a search in a page. Would 
be nice as a gadget for example.

Other wikis have that.

Thanks
-Vincent

On Mar 23, 2011, at 2:27 PM, Thomas Mortagne wrote:

 Include macro include content before it's executed by default so you
 can't use that for your use case or at least not like that.
 
 If you use context=new the content will be executed before it's
 included but there is no support for parameters in include macro since
 even in this case it does not execute like a browser either.
 
 Depending of the page you are trying to include there could be
 velocity variable you could set before the include context=new to
 indicate what the page is supposed to do. You will have to look at
 Search page source code to see if it can support it.
 
 The only other way would be to replace the $request in the context to
 set your own parameters but i doubt you can do that with public API
 and it's hard to do in Velocity since you can't create new java
 object.
 
 You can of course write your own macro do support this use case. See
 http://platform.xwiki.org/xwiki/bin/view/DevGuide/WritingMacros
 
 On Wed, Mar 23, 2011 at 14:14, Legeinfo v...@legeinfo.net wrote:
 Hallo!
 
 How to include a search like that in a page?
 .../Main/Search?text=foo+bar
 
 {{include document=Search?text=foo+bar/}}
 does not do the job.
 
 Volker
 
 
 --
 View this message in context: 
 http://xwiki.475771.n2.nabble.com/include-search-with-parameters-tp6199809p6199809.html
 Sent from the XWiki- Users mailing list archive at Nabble.com.
 ___
 users mailing list
 users@xwiki.org
 http://lists.xwiki.org/mailman/listinfo/users
 
 
 
 
 -- 
 Thomas Mortagne
 ___
 users mailing list
 users@xwiki.org
 http://lists.xwiki.org/mailman/listinfo/users

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] include search with parameters

2011-03-23 Thread Thomas Mortagne
On Wed, Mar 23, 2011 at 14:45, Vincent Massol vinc...@massol.net wrote:
 We need a search wiki macro to include the result of a search in a page. 
 Would be nice as a gadget for example.

Yes we need plenty of macros like that :)


 Other wikis have that.

 Thanks
 -Vincent

 On Mar 23, 2011, at 2:27 PM, Thomas Mortagne wrote:

 Include macro include content before it's executed by default so you
 can't use that for your use case or at least not like that.

 If you use context=new the content will be executed before it's
 included but there is no support for parameters in include macro since
 even in this case it does not execute like a browser either.

 Depending of the page you are trying to include there could be
 velocity variable you could set before the include context=new to
 indicate what the page is supposed to do. You will have to look at
 Search page source code to see if it can support it.

 The only other way would be to replace the $request in the context to
 set your own parameters but i doubt you can do that with public API
 and it's hard to do in Velocity since you can't create new java
 object.

 You can of course write your own macro do support this use case. See
 http://platform.xwiki.org/xwiki/bin/view/DevGuide/WritingMacros

 On Wed, Mar 23, 2011 at 14:14, Legeinfo v...@legeinfo.net wrote:
 Hallo!

 How to include a search like that in a page?
 .../Main/Search?text=foo+bar

 {{include document=Search?text=foo+bar/}}
 does not do the job.

 Volker


 --
 View this message in context: 
 http://xwiki.475771.n2.nabble.com/include-search-with-parameters-tp6199809p6199809.html
 Sent from the XWiki- Users mailing list archive at Nabble.com.
 ___
 users mailing list
 users@xwiki.org
 http://lists.xwiki.org/mailman/listinfo/users




 --
 Thomas Mortagne
 ___
 users mailing list
 users@xwiki.org
 http://lists.xwiki.org/mailman/listinfo/users

 ___
 users mailing list
 users@xwiki.org
 http://lists.xwiki.org/mailman/listinfo/users




-- 
Thomas Mortagne
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] include search with parameters

2011-03-23 Thread Legeinfo

Thomas Mortagne wrote:
 
 ...Yes we need plenty of macros like that :)
 

Another question/macro:

How to use multiple Tags?
Tags?tag=foo+tag=bar

I want only pages with both(all) tags.

Volker

--
View this message in context: 
http://xwiki.475771.n2.nabble.com/include-search-with-parameters-tp6199809p6201565.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users



Re: [xwiki-users] include search with parameters

2011-03-23 Thread Sergiu Dumitriu
On 03/23/2011 08:10 PM, Legeinfo wrote:

 Thomas Mortagne wrote:

 ...Yes we need plenty of macros like that :)


 Another question/macro:

 How to use multiple Tags?
 Tags?tag=foo+tag=bar

 I want only pages with both(all) tags.


Are you referring to the Main/Tags document? Then it isn't possible at 
the moment, see http://jira.xwiki.org/jira/browse/XATAG-4

-- 
Sergiu Dumitriu
http://purl.org/net/sergiu/
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users