#17646Hook in browse_links request (for linking to records)
Description
Intention:
A editor should be able to select a record (like tt_news) in the linkwizard.
So he can select a newsrecord and the link is trandlated to a correct link to the detailview of that record.
What needs to be changed:
1) the link wizard (in RTE and the normal one) needs a hook -> so that other extension can easily add tabs.
relevant classes:
>typo3/class.browse_links.php
>ext/rtehtmlarea/mod3/class.tx_rtehtmlarea_browse_links.php
2) the hook is used to generate individual tabs in the wizards (by an extension.) the tabs can be configured in TSConfig:
You are able to add a default configuration, and you are also allowed to ovveride it for the RTE linkwizard.
RTE.default.tx_linkhandler {
record {
label=Records
listTables=*
}
tt_news {
label=News
listTables=tt_news
onlyPids=5
}
}
mod.tx_linkhandler {
record {
label=Records
listTables=*
}
tt_news {
label=News
listTables=tt_news
onlyPids=5
}
}
3) Link to records are encoded like record:tt_news:1 by this extension
4) The typolink function has a new function called linkHandlers. This is used by the extension to translate this links to real links, therefore you have all the power of typolink.
Example:
plugin.tx_linkhandler {
tt_news {
parameter={$linkhandler.newsSinglePid}
additionalParams=&tx_ttnews[tt_news]={field:uid}
additionalParams.insertData=1
}
}
5) to avoid this ugly yellow box around links in RTE a patch in
t3lib/class.t3lib_parsehtml_proc.php is needed
Install the attached extension to review all. (Add static typoscript)
The attached extension has all this adjustments to the coreclasses as xclass for now – but i wish that this changes can go in the next release to avoid the XCLASS.
Also be sure you have actual SVN, because linkHandler in typoscripts are buggy in actual release:
see: <http: bugs.typo3.org></http:>
(issue imported from #M6442)
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.