Editing Sandbox
From PCSAR
Warning: You are not logged in. Your IP address will be recorded in this page's edit history.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Current revision | Your text | ||
Line 1: | Line 1: | ||
- | + | == Suggestion list == | |
+ | {{Suggestion list}} | ||
- | + | {{#ask: [[Category:suggestion]]<!-- | |
- | + | -->[[Suggestion list::Sandbox]]<!-- | |
- | + | -->|format=list<!-- | |
+ | |||
+ | -->|searchlabel=<!-- | ||
+ | |||
+ | -->|link=none<!-- | ||
+ | |||
+ | -->|order=reverse<!-- | ||
+ | |||
+ | -->|limit=1<!-- | ||
+ | |||
+ | -->}} | ||
+ | |||
+ | {{#ask: [[Category:suggestion]]<!-- | ||
+ | |||
+ | -->[[Suggestion list::Sandbox]]<!-- | ||
+ | |||
+ | -->|format=list<!-- | ||
+ | |||
+ | -->|searchlabel=<!-- | ||
+ | |||
+ | -->|link=none<!-- | ||
+ | |||
+ | -->|order=reverse<!-- | ||
+ | |||
+ | -->}} | ||
+ | |||
+ | |||
+ | {{suggestion number<!-- | ||
+ | |||
+ | Would like to increment past the last suggestion in the current list | ||
+ | (to handle gaps due to reassigning/deleting). | ||
+ | |||
+ | However absence of string functions makes that very | ||
+ | difficult/impossible to implement with old style of segment names | ||
+ | "Sug1". In those cases, use as a surrogate use count of current | ||
+ | suggestions. | ||
+ | |||
+ | New style name "Sug/0001" can just strip off last segment. | ||
+ | |||
+ | -->|{{#iferror:<!-- | ||
+ | |||
+ | -->{{#expr:<!-- | ||
+ | |||
+ | -->{{#titleparts:<!-- | ||
+ | |||
+ | -->{{#ask: [[Category:suggestion]]<!-- | ||
+ | |||
+ | -->[[Suggestion list::Sandbox]]<!-- | ||
+ | |||
+ | -->|format=list<!-- | ||
+ | |||
+ | -->|searchlabel=<!-- | ||
+ | |||
+ | -->|link=none<!-- | ||
+ | |||
+ | -->|order=reverse<!-- | ||
+ | |||
+ | -->|limit=1<!-- | ||
+ | |||
+ | -->}}<!-- | ||
+ | |||
+ | |||
+ | get just the last segment of the suggestion page name | ||
+ | |||
+ | -->||-1}}<!-- | ||
+ | |||
+ | -->+1}}<!-- | ||
+ | |||
+ | default if error: (caused by "Sug" in segment name not being a simple | ||
+ | number) | ||
+ | |||
+ | -->|{{#expr: {{Suggestion list/Count|{{FULLPAGENAME}}}} + 1 }}<!-- | ||
+ | |||
+ | -->}}<!-- | ||
+ | |||
+ | -->|add a new suggestion<!-- | ||
+ | |||
+ | -->}}<!-- | ||
+ | |||
+ | --> |