Feature #16477
closedNavigation title in tree view
0%
Description
How about being able to display the navigation title instead of the page title in the page tree view? This could be set via the Page TSConfig. The default would be the page title, of course, so that nothing changes.
It's just an idea based on a request from a customer. The thing is that referencing extremists tend to set up very long page titles for the search engines, which become nearly unusable in the page tree view.
(issue imported from #M4064)
Files
Updated by Thomas Hempel about 18 years ago
I just added a DIFF that implements this. you can set an option called
options.pageTree.showNavTitle
If no navtitle is set, the behavior is as usual.
Greets,
Thomas
Updated by Sebastian Kurfuerst about 18 years ago
Hi Thomas,
thanks for the patch! I just have one suggestion:
in line 15 of your patch, you do a strlen, why not just use "else" instead and change the strlen($row['nav_title']) in line 11 to strlen(trim($row['nav_title'])) - that should have the same effect and be faster because you have one function call less.
Greets, Sebastian :-)
Updated by Dmitry Dulepov about 18 years ago
Note: this will work only for page tree but not for RTE.
Updated by Thomas Hempel about 18 years ago
@Sebastian Kurfuerst: Hm... No reason I guess. Yesterday evening it made more sense. ;-) I will change that.
@Dmitry Dulepov: Ok, don't thought about it. I will provide a new patch later this day.
Greets,
Thomas
Updated by Thomas Hempel about 18 years ago
@Sebastian Kurfuerst: Here is a new patch with an else case. :-)
@Dmitry Dulepov: I don't know if this should be implemented. This hole thing works very similiar to the "showPageIdWithTitle" option which is also not support by the browse links and RTE.
So what do you think? Should I implement this anyhow?
Greets,
Thomas
Updated by Jan Wulff about 18 years ago
Hi
Just replace "$this->ext_showNavTitle" with "$BE_USER->getTSConfigVal('options.pageTree.showNavTitle')" and it works fine with the RTE. After also setting the following in the TCA, it looks like the nav_title is used everywhere.
$TCA['pages']['ctrl']['label'] = 'nav_title';
$TCA['pages']['ctrl']['label_alt'] = 'title';
Regards
Jan
Updated by Steffen Müller almost 18 years ago
The patch works for me with 4.0.4, but not with 4.1RC1
Jan Wulffs addition breaks the pagetree with
Fatal error: Call to a member function on a non-object in /var/www/testsysteme/demosystem/typo3_src-4.0.4/t3lib/class.t3lib_treeview.php on line 677
Updated by Benni Mack almost 18 years ago
I could modify the patch so it works with the 4.1 pagetree.
Updated by Benni Mack almost 18 years ago
What about an option like:
options.pageTree.label = nav_title
default would be "title", and we would dynamically add this to the fieldlist then (for all pagetrees, not just alt_db_navframe.php).
Is that ok?
Updated by Thomas Hempel almost 18 years ago
Hi,
the point is, that the pagetree is not rendered at the some point in core currently. So we have to implement this at various places. If someone want to do this: Go ahead! :-)
By the way, I like the idea to make it configurable.
Greets,
Thomas
Updated by Steffen Müller over 17 years ago
Benjamin, could you please post your modification for use with 4.1?
Updated by Benni Mack over 17 years ago
Hey Steffen.
I'd rather wait to get a good version into core instead of having an option like
options.pageTree.showNavTitle = 1
that is going to be deprecated in a couple of versions anyway or once people start to want extra options like:
options.pageTree.showAlias = 1
Since nobody is going to do something here, I'll see what I can do to get a "good" fix going. This could take another couple months since I'm quite busy these days, but I'll put it on my todo. (Don't worry - It'll be ready for 4.2 ;-))
Updated by Thomas Hempel over 17 years ago
I sent an RFC to core list with a new patch version that implements "showNavTitle" for normal page tree and wizard trees in current trunk version.
Greets,
Thomas
Updated by Thomas Hempel about 17 years ago
Committed to trunk (revision 2508)
Greets,
Thomas