Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option/flag to show parent namespace path of listed pages #26

Closed
martinus33 opened this issue Jul 10, 2012 · 6 comments
Closed

Option/flag to show parent namespace path of listed pages #26

martinus33 opened this issue Jul 10, 2012 · 6 comments

Comments

@martinus33
Copy link

When listing pages for example with the Tag Plugin, it would be great to be able to display X parent levels of pages containing the tag.

Would be useful for example if you tag a page "hotpage", to mean the page is to be kept updated then we could be able to list all of theses with their corresponding namespace path in the [start] page.

What do you think ?

@leeyc0
Copy link

leeyc0 commented Sep 3, 2012

I have made a patch myself to list whole page name including namespace.

--- pagelist.org/helper.php 2012-09-03 10:57:52.765809097 +0800
+++ pagelist/helper.php 2012-09-03 10:58:00.144807653 +0800
@@ -324,7 +324,7 @@

         // produce output
         $content = '<a href="'.wl($id).($this->page['section'] ? '#'.$this->page['section'] : '').
-            '" class="'.$class.'" title="'.$id.'">'.$title.'</a>';
+            '" class="'.$class.'" title="'.$id.'">'.$id.'</a>';
         if ($this->style == 'list') $content = '<ul><li>'.$content.'</li></ul>';
         return $this->_printCell('page', $content);
     }

@martinus33
Copy link
Author

Thanks,
But this is not exactly what I mean. Using $id displays the full absolute namespace id ... what would be needed is the possibility to display the first (relative) parent page headline (or id if $usefirsthl parameter is not true.)

let see by example:

root:ns_tutu:ns_toto:folder with a file root/ns_tutu/ns_toto/folder.txt containing
=== the folder ===

root:ns_tutu:ns_toto:folder:a_page with a file root/ns_tutu/ns_toto/folder/a_page.txt containing
=== a file ===

So I want pagelist to display a link within it's name "the folder - a file" or "folder:a_page.txt" if $usefirsthl is not enabled.

So every time you add a file with a given tag , it displays links that way.

@martinus33
Copy link
Author

Hi ! I'm sorry I read all the references but can't understand how to make it work (like my last post above) :(
Is anyone can give a hand ? Thanks !

@lupo49
Copy link
Member

lupo49 commented Apr 21, 2013

Open the file lib/plugins/pagelist/helper.php and search for

'" class="'.$class.'" title="'.$id.'">'.$title.'</a>';

replace it with

'" class="'.$class.'" title="'.$id.'">'.$id.'</a>';

@martinus33
Copy link
Author

Hi ! Yes thanks I understand the patch and I have already tested it before : this is not what I meant in my original requests.
I need only one namespace level to be displayed and if possible handle the $usefirsthl

See my comment #26 (comment)

@Klap-in
Copy link
Member

Klap-in commented Aug 25, 2023

I will not implement this, as it is probably a too specific use. However, you can implement it probably rather similar as above, but by using curNS($id).

@Klap-in Klap-in closed this as not planned Won't fix, can't repro, duplicate, stale Aug 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants