Re: [xwiki-users] Creating Nested Page Hierarchies

2016-03-20 Thread Jesse Bright
Never mind, I found these after I posted:

http://platform.xwiki.org/xwiki/bin/view/DevGuide/APIGuide#HCreateanewDocument
http://extensions.xwiki.org/xwiki/bin/view/Extension/Immediate+Children+Pages

I had search for this before but without including 'velocity' in the search I 
was only getting the more basic instructions. 

Regards,

Jesse

> On Mar 19, 2016, at 1:55 PM, Personal  wrote:
> 
> I am creating a knowledge base for a local municipal code which follows a 
> typical book hierarchy. I plan on using nested pages to create a pages 
> hierarchy for navigating and searching the code text at different levels. For 
> example each end page would have a space path like so:
> 
> Title 19.Part 2.Chapter 4.Section 100
> Title 19.Part 2.Chapter 4.Section 200
> etc.
> 
> Currently I am using a Velocity macro to create links to each child page and 
> at the chapter level I also start including the child pages. I then follow 
> the links to make the child pages. This works relatively well but has a 
> couple of disadvantages. 1) It is slow to create each page by repeatedly 
> following the links, selecting the template and pasting the next tier of 
> code. 2) It hardcodes the child page names which if changed (say due to a 
> typo) must be updated by hand each time.
> 
> I am wondering if there is a more efficient way that I can automate the page 
> and link creation process. Ideally I would have a way to create the complete 
> page hierarchy by providing the names and levels of each page with the same 
> code in each page providing a link to each child of that page. Then I could 
> paste the content text into each page at the end of the branch. I have done 
> something similar to this using Jeykell but that is much simpler as it is 
> static content based on the file structure. If I am going about this all the 
> wrong way I am open to other suggestions.
> 
> Regards,
> 
> Jesse
> 
> ___
> 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


[xwiki-users] XAR-Import

2016-03-20 Thread Matthias Wegner
Hi Users,

i made a custom xar-file because i want to import some content into XWiki
8.0. But it seems to stuck. i can upload the file but it is never imported.

The request.log show only
127.0.0.1 - - [20/Mrz/2016:20:51:39 +] "POST
/xwiki/bin/upload/XWiki/XWikiPreferences HTTP/1.1" 302 - 
127.0.0.1 - - [20/Mrz/2016:20:51:40 +] "GET
/xwiki/bin/get/XWiki/XWikiPreferences?xpage=packagelist&forceTestRights=1
HTTP/1.1" 200 946 
127.0.0.1 - - [20/Mrz/2016:20:51:41 +] "POST
/xwiki/bin/get/XWiki/XWikiPreferences?xpage=packagedescriptor&package=B.xar
HTTP/1.1" 200 133 

so i have no clue whats wrong. My created xml-files seem correct. Can i send
you an example, so you can test why it is not working? I have no idea.

Regards,
Matthias



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/XAR-Import-tp7598556.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] Skip name dialog in App Within Minutes

2016-03-20 Thread Wiki Service-Team

Hey i found this tutorial:
https://www.xwiki.org/xwiki/bin/view/FAQ/How+can+I+create+a+new+page+based+on+a+form

so this Situation is very similar to mine except that i want the name 
auto generated name of the document which is created then.


Here is an Module for exactly this:
http://extensions.xwiki.org/xwiki/bin/view/Extension/Unique+Identification+Number+Module

but i cant figure out how to change the code,
so that the new created page is not based on the value of docName rather
than it is based on $uin.getNextAvailableUIN()

#if("$!request.docName" != '')
  ## Request for creating a new instance
  #set($targetDocReference = 
$services.model.createDocumentReference('', $!{request.spaceName}, 
$!{request.docName}))
 $response.sendRedirect($xwiki.getURL($targetDocReference, 'inline', 
"template=${escapetool.url($request.template)}&parent=${escapetool.url($request.parent)}"))

  ## Stop processing, since we already sent a redirect.
  #stop
#end

= Add a new question =

{{html}}
 
   
 
 
 
 
  Document: 
 

   
 
{{/html}}


If someone gives me a little further information i would be very grateful.

Thanks
Felix


Am 17.03.2016 um 13:18 schrieb Eduard Moraru:

Hi,

Ludovic`s suggestion, as far as I understand it, was to create your own
button/link on the application`s homepage that takes the user to a
constructed URL what uses the entry name that you want.

/xwiki/bin/edit//Data/?template=test.Code.testTemplate&parent=test.WebHome&editor=inline

You can generate such an URL with velocity using:

$xwiki.getDocument(".Data.", "edit",
"template=test.Code.testTemplate&parent=test.WebHome&editor=inline")

You would do this modification in the applcation's homepage, which is
located in ".Data.WebHome".

Hope this helps,
Eduard

On Tue, Mar 15, 2016 at 8:27 PM, Wiki Service-Team 
wrote:


Hello all,

I have a question about these case:
http://lists.xwiki.org/pipermail/users/2014-July/028689.html

i would love to implement exactly the same our wiki ( we are using some
forms where employees put in simple data like wo they called over the day).
I created an app with app within minutes, everything is working fine, but
i would also like to skip the name dialog in App Within Minutes and replace
it with an auto generated random number, so the user should be directly in
the edit URL.

I think the best advise came from Ludovic, but my scripting knowledge is
not as good to understand the advise from him directly,
so can someone give me a little further explanation of how to script my
own Burton using the document api and than
redirection the user to the edit URL.

I would be very grateful for an advice what helps me to accomplish these
goal.

Thanks
Felix

___
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


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