Feature #16477
closed
Navigation title in tree view
Added by Francois Suter over 18 years ago.
Updated over 14 years ago.
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
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
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 :-)
Note: this will work only for page tree but not for RTE.
@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
@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
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
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
I could modify the patch so it works with the 4.1 pagetree.
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?
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
Benjamin, could you please post your modification for use with 4.1?
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 ;-))
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
Committed to trunk (revision 2508)
Greets,
Thomas
Also available in: Atom
PDF