Edgewall Software

Opened 12 years ago

Last modified 5 years ago

#10872 new task

Add New Page and Link to current page

Reported by: david.ullua@… Owned by:
Priority: normal Milestone: unscheduled
Component: wiki system Version: 1.0dev
Severity: normal Keywords: new page
Cc: ethan.jucovy@…, ralph.phd@… Branch:
Release Notes:
API Changes:
Internal Changes:


Trac is a wonderful product with many great plugins. tags, menus, wanted page, git, announcer… And I wish it could be easier to add new pages.

Can I just click a button or link to add a new page, and enter the page name, then keying the content? Also if a checkbox option exists for link the new page to the previous, it would be perfect.

If the function already exist by any plugins or macros, please let me know. Plus, I would like to add the function/plugin to trac and release it.

But I don't know how to implement the plugin, anyone could help?

Attachments (0)

Change History (6)

comment:1 by Christian Boos, 12 years ago

Milestone: unscheduled

Well, this kind of feature request had better been sent on the Trac-Users MailingList, as not many plugin developers follow the activity on this Trac.

It's a recurring topic though, and if someone has a good idea/patch proposal for integration of this feature in Trac proper, suggestions welcome.

comment:2 by Ethan Jucovy <ethan.jucovy@…>, 12 years ago

FYI Benjamin Lau has written a plugin that provides a [[NewPage()]] wiki macro, which will render a form for creating a new wiki page: https://github.com/netjunki/trac-NewPageMacro

This doesn't satisfy all the OP's requirements (it's a wiki macro, not a nav element, so it would have to be added to every page somehow in order to be convenient; and it doesn't let you "link new page to previous") but it might be useful, or an inspiration .. it might be possible to get most of what you want by some trickery with this plugin + a wiki page template that includes the macro.

comment:3 by Ethan Jucovy <ethan.jucovy@…>, 12 years ago

Cc: ethan.jucovy@… added

comment:4 by david, 12 years ago

cboos and Ethan, thanks for your suggestions.

comment:5 by ralph.phd@…, 5 years ago

Below is a lazy hack to add a "Create Child Page" button in Trac v1.4 (requires jQUery). It create the child page with a default name "NewPage", but you can rename it as needed after creating it. Add the code to the trac env footer template, e.g. PROJECT/templates/site_footer.html. Restart the server, and you should be good to go.

    // adds a "create child page" button in wiki pages named "NewPage"
    // you can rename it after creating as needed.
    // url to creat/edit the new page
    var edit_url =  window.location.href + "/NewPage?action=edit";
    // check we're not on a page that has the "create" button already
    var pcheck   = $('input[value="Create this page"]').length;
    // add child create button
    if (pcheck == 0){
        $('form#modifypage').after($('<input type="button" value="Create Child Page" onClick="location.href=\'' + edit_url + '\';">'));


comment:6 by ralph.phd@…, 5 years ago

Cc: ralph.phd@… added

Modify Ticket

Change Properties
Set your email in Preferences
as new The ticket will remain with no owner.
The ticket will be disowned.
as The resolution will be set. Next status will be 'closed'.
The owner will be changed from (none) to anonymous. Next status will be 'assigned'.

Add Comment

E-mail address and name can be saved in the Preferences .
Note: See TracTickets for help on using tickets.