hotxbuns Is it possible to change the default path so that it goes to A:B:page instead?
"Well, everything is possible, if you know how to write code."
In my DokuWiki, I open the subfolder/namespace dynamically/user dependent by the following code:
setTimeout(function() {
if (jQuery("h1:contains('Media Manager')").length > 0) {
jQuery("a.idx_dir").each(function() {
if( jQuery(this).text() == JSINFO['plugin_do_user'] ) {
jQuery(this).click();
}
});
}
}, 2000);
Here, I use the user information from the JSINFO variable to open the personal folder of the logged in user. Something similar could be done for any subfolder/namespace. (The above solution works with the do plugin installed and the 1st heading of the media manager page 'Media Manager'.)
So in your case, you could try this. You can put the following lines of code into /dokuwiki/conf/userscript.js
(create this file if it does not exist yet):
setTimeout(function() {
if (jQuery("h1:contains('Media Manager')").length > 0) {
jQuery("a.idx_dir").each(function() {
if( jQuery(this).text() == JSINFO['id'].split(':').slice(-1)[0] ) {
jQuery(this).click();
}
});
}
}, 2000);
However, this will work only if the subfolder/namespace with your pagename already exists in the index. If not, it might be possible to establish this, by some more code. And yes, this is just that - a little clickbot.
However, always save your file and don't forget to refresh your cache!
Another thing that can be done to open a specific folder by default, is by creating a special link and overwriting your default media manager link:
$media_manager_link = '/doku.php?id=start&ns=upload&tab_files=files&do=media';
jQuery( 'a[title="Media Manager"]' ).attr( 'href', $media_manager_link );
What happens here, when you click on the default media manager link, the media manager is loaded with the subfolder/namespace 'upload' open. Some bits and pieces of this code might depend on your template and might have to be fine tuned to make it work. And it could be tailored other than that. (This example from my DokuWiki works when you have a start page named 'start' in the root directory of your wiki and your Media Manager Link has the title 'Media Manager', you can replace 'upload' by your desired namespace in the link.)
May these examples be helpful for finding a specific solution for your usecase! [1]
Cheers!