SID-00882: File Naming Convention.
| Status: |
Answered |
TWiki version: |
5.0.0 |
Perl version: |
5.10.1 |
| Category: |
CategoryAccessControl |
Server OS: |
|
Last update: |
15 years ago |
Hi,
Whenever a new user creates a new wiki page I would like to add a naming convention to it?
For Ex:-
The File name of the wiki should be prefixed with the current year followed by the file name - ex: 2010-newcustomer
Please let me know how to do it?
Regards,
Sairam Prasath.
--
SairamPrasath - 2010-07-04
Discussion and Answer
Are you referring to TWiki topics (wiki pages) or file attachments?
If TWiki topics: You can create an form that shows a topic name to create. The name can be pre-filled, such as current date. See example
MeetingMinutes. See docs
TWikiTemplates.
If
FileAttachments: You need to change the filename locally before you upload to TWiki.
--
PeterThoeny - 2010-07-05
Hi Peter,
Thanks for your reply. I am referring to WIKI pages. I want to prefix the word (Money) in all the wiki pages that a user creates newly..
Is this possible? How to configure that in TWIKI?
Regards,
Sairam.
--
SairamPrasath - 2010-07-05
As I mentioned, you need to create an HTML form. Example at
TWikiTemplates. In your case show a visible form field where the user can enter the name of the page. Add some JavaScript on the
onblurr event that prefixes the page name with "Money". You can do some additional sanitizing work on the topic name. Study the JavaScript in
TWikiRegistration.
Once happy with the result you can customize your
WebCreateNewTopicTemplate so that all new topics created have that JavaScript logic.
--
PeterThoeny - 2010-07-05
Closing this question after more than 30 days of inactivity. Feel free to reopen if needed. Consider engaging one of the
TWiki consultants if you need timely help. We invite you to
get involved with the community, it is more likely you get community support if you support the open source project!
--
PeterThoeny - 2010-09-13
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.