It's a button??? (lol)
Not sure what you're laughing at… was my comment in the history funny, or did you have it right all along and I wasn't meant to edit it? xD Am confused. :)
~ Leiger - Wikidot Community Admin - Volunteer
Wikidot: Official Documentation | Wikidot Discord server | NEW: Wikiroo, backup tool (in development)
LOL XD
~ Leiger - Wikidot Community Admin - Volunteer
Wikidot: Official Documentation | Wikidot Discord server | NEW: Wikiroo, backup tool (in development)
Thanks James, this is very useful.
Rob Elliott - Strathpeffer, Scotland - Wikidot first line support & community admin team.
I just starting using this and find it very useful. I have one suggestion for a minor CSS tweak. I prefer the button text to be centered in the button. If you would like this as well, add this to the page containing your include:
[[module css]] .newpage-button td { text-align: center; } [[/module]]
I was going to suggest that James make this change to his CSS, but that's a bit selfish if others prefer it the way it is. Adding it as a css module to your own site won't "break" the layout on existing sites that are using this very nifty snippet.
If you want full control over the button CSS, just copy James' entire framework above and place it in a css module on your site and make whatever other changes you like.
-Ed
At the time of this post (392 days after the birth of NPB), there are 45 pages on Wikidot using this technology!
A couple of questions:
- How are you getting this value? How do you count this?
- Does a live template get detected as a single page, or multiple pages?
~ Leiger - Wikidot Community Admin - Volunteer
Wikidot: Official Documentation | Wikidot Discord server | NEW: Wikiroo, backup tool (in development)
Options » Backlinks on each page gives a list of all pages that include the current page. I'm pretty sure a live template only counts as one inclusion.
Bryce is right, I went to the applicable include page, and clicked on the backlinks.
You could count each inclusion listed, but I just copy-pasted into a text editor, and did a search count on the number of “new line characters” in the document, plus 1 (for the first included page).
Fortunately for the purpose of this exercise, Live Templates and Top/Side Navigators count for one page each.
Ah, there's a new section of the Backlinks tool I've never seen before!
Inclusions (using [[include]])
Cool! :)
So this counts CSIs too? That is AWESOME.
~ Leiger - Wikidot Community Admin - Volunteer
Wikidot: Official Documentation | Wikidot Discord server | NEW: Wikiroo, backup tool (in development)
For attribute 'name', it says that it is required…
yes if new page uses a dataform, no if it doesn't
I can't see why using a dataform would change the need for a name to be defined or not. Is there any reason for this? :S
~ Leiger - Wikidot Community Admin - Volunteer
Wikidot: Official Documentation | Wikidot Discord server | NEW: Wikiroo, backup tool (in development)
Umm, according to the history, Rob changed it to say that… I don't understand it either.
Rob, could you please shed some light here for us?
Curiously I've only just noticed the last couple of posts.
Presumably you haven't tested this which is why you don't understand why I made the change. If you use this (brilliant) button to create a page in a category that uses a dataform it must have the name= with a value otherwise you just get the standard page editor. I have no idea why.
Example
On the page http://vineyard.wikidot.com/bands I have 3 newpage buttons which should create a page in the band category. Do try each of them.
This code using the name= with a value works fine:
[[include :snippets:newpage-button
|size=30
|category=band
|name=band
|parent=bands
|button=Add a new band
]]
This one without the name= just gives the standard page editor.
[[include :snippets:newpage-button
|size=30
|category=band
|parent=bands
|button=Add a new band
]]
Even if you put name= in without a value it still just shows the standard page editor.
[[include :snippets:newpage-button
|size=30
|category=band
|name=
|parent=bands
|button=Add a new band
]]
Rob Elliott - Strathpeffer, Scotland - Wikidot first line support & community admin team.
Hallo James!
I detecetd that I am not able to create automatically by click short pages with only title ( fixed-given), name(autonumbered), tags ( given) and parent.
And - important - the creator who has clicked on the button.
Ihave tested it on my home test site for the quiz/question problem :
http://helmuti-pdorf.wikidot.com/testq1:_start where i have testet the different ways to do so .
Target is to have a page created in the background and not to leave the "parent" ( or other button holding) page.
Is it possible to insert from the http://www.wikidot.com/doc:newpage-module the two extra attributes:
( the mode command could be difficult to solve.)
Attributes for AutoSave function
attribute | required | allowed values | default | description |
---|---|---|---|---|
mode | no | edit, save-and-refresh, save-and-go | edit | "edit" takes you to an editor. "save-and-refresh" saves the page and refreshes the current page. "save-and-go" saves the page and goes to it (without editor) unless goTo attribute is passed |
goTo | no | valid page name | none | specifies which page to go to after automatically saving a page |
Service is my success. My webtips:www.blender.org (Open source), Wikidot-Handbook.
Sie können fragen und mitwirken in der deutschsprachigen » User-Gemeinschaft für WikidotNutzer oder
im deutschen » Wikidot Handbuch ?
Hey Helmuti!
I'll investigate it in the coming few weeks for you, things are a little busy at the moment.
Feel free to remind me if I forget :)
Hi James,
Thanks for the offer!
I tried to find out if there is an url-command (like the /tags/…/ or /parentPage/ ) /mode/save-and-refresh/ or so,….
but I am affraid - this is not possible to use.
Service is my success. My webtips:www.blender.org (Open source), Wikidot-Handbook.
Sie können fragen und mitwirken in der deutschsprachigen » User-Gemeinschaft für WikidotNutzer oder
im deutschen » Wikidot Handbuch ?