The NewPage module makes it possible to create a page semi-automatically. This is a design sketch for an improved version of the module.
These let the user create page with different metadata from the same NewPage module.
This allows for create-or-goto scenarios - if the page already exists, the user goes there. We call this a "relaxed" NewPage:
[[module NewPage parent="." size="40"]]
[[button text="Bug" tags="open _bug" ]]
[[button text="Wish" tags="open _wish" ]]
[[/module]]
Where will this link be shown? Instead of the text-entry box? So that means that the button will still be there…? I'm having a hard time trying to visualise what you mean by this ;-)
Okay, so if tags, parent or title(?1) buttons are shown, the default button is not shown…
Again I'm having trouble understanding what the layout of this would be.
Could you perhaps mock up a preview of the design as a sketch in a paint program?
~ Leiger - Wikidot Community Admin - Volunteer
Wikidot: Official Documentation | Wikidot Discord server | NEW: Wikiroo, backup tool (in development)
I've been playing with text links in the wikified forum, for creating threads. This is how it looks:
Create a new Something
No button, no entry box. It needs, internally, to not generate a page name until the page is saved, and then take the page name from the title.
For custom buttons, here's a scenario: create a bug report, or a change request from the same input field. Bug reports are tagged as _bug and formatted as "Bug: %s", while change requests are tagged as _change and formatted as "CR: %s". One input field, two buttons, and no default button.
Do you see?
Portfolio
I think so.
I rely on the page name being different to the title in one of my sites.
Whereas if I decided to have no default button — then I'd be forced to save the page, then go to options > rename. Correct?
~ Leiger - Wikidot Community Admin - Volunteer
Wikidot: Official Documentation | Wikidot Discord server | NEW: Wikiroo, backup tool (in development)
Uhm, no, you're mixing different things here. The default button vs. custom buttons is just about allowing multiple tag/parent/title sets to be used with a single NewPage module. You can imagine making 2 NewPage modules and merging them into one, with two buttons. Nothing else than this.
If you use the text= argument (if implemented) then you don't get a space to enter a title, and you enter that on the new page instead. When you save the page, Wikidot would for non-autonumbered categories generate a page name from the title. You could rename the page after saving. AFAICS this is how it works today when you enter the title beforehand, you also need to save and then rename the page.
Portfolio
I don't think I understand the concept still, but it's not that important :) Just wanted to make sure I understood it, so that I could point out any potential flaws in the design.
The way the module works today is that the page name is taken from the text entered into the NewPage module text-box. If you type "hello" into the text-box and click the button, then change the title to "goodbye", then the page will be named as 'hello' with a title of 'goodbye'
So the pagename is generated from what is entered into the newpage module, and not from the title. Which is a good thing :)
~ Leiger - Wikidot Community Admin - Volunteer
Wikidot: Official Documentation | Wikidot Discord server | NEW: Wikiroo, backup tool (in development)
I would like to see an option to modify the behavior of the module when a page already exists.
Something like.
error-on-exists="true" - module behaves as it does currently.
error-on-exists="false" - it opens the page referred to immediately without showing an error.
Wayne Eddy
Melbourne, Australia
LGAM Knowledge Base
Contact via Google+
Not so sure we really need the horizontal alignment part. If modules are made to work in-line, things can be formatted just fine using div blocks, things like [[>]], etc.
Though it could be useful until the in-line modules feature is implemented.
~ Leiger - Wikidot Community Admin - Volunteer
Wikidot: Official Documentation | Wikidot Discord server | NEW: Wikiroo, backup tool (in development)
True. I'm not sure when we can expect inline modules though.
Portfolio
In addition to category, tags, and parent, could we add title="title-text"? Where title-text might even include replacement variables (e. g. %s) like those for autonumbering pages.
An example would be the File Manager package where all category pages have a title “List by Category” (which now has to specified manually).
P.S. How come your blog comments module has such cool buttons, and where can I get them??
Because the site uses this CSS code to make the buttons look like that:
Just add that code to your custom CSS, and hey presto, you'll have sexy buttons :D
Maybe worth adding to the rainbow themes… :-)
Portfolio
Done.
Portfolio
That is awesome. Now all I need is the image URL! (creating graphics a definite weak point.)
S
I love it!
Is there a way to control in the module whether the button appears next to, below, or above the entry box?
Clarification: changing the visible width of the entry box has no effect on how many characters someone can type into it, right?
On a side note, I love the Newpage module, in particular the "category" and "tag" features which allow me to create pages that will immediately be categorized/tagged, and can therefore receive instant formatting from category templates and immediately appear in ListPages feeds. Yay.
This could be done. I don't see the value in 'above', that'd just be weird.
Yes, it allows a full title in any case. When we get to forms you'll have independent control of the visible field size and the internal value size.
Portfolio
The semi and full concepts…Genius.