Bug #17646
closedHook in browse_links request (for linking to records)
0%
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/view.php?id=5701>
(issue imported from #M6442)
Files
Updated by Daniel Poetzinger about 17 years ago
tested with actual SVN trunk - and uploaded patch files related to actual SVN trunk version.
Please review
Updated by Stanislas Rolland almost 17 years ago
This patch is creating errors in htmlArea RTE popup windows. See issue 6961
Updated by Daniel Poetzinger almost 17 years ago
6961 can be solved easy:
a simple is_array() check should be ok.
or (as in my inital patch)
// init hook objects:
$this->hookObjects = array();
in the init function.
Updated by Stanislas Rolland almost 17 years ago
Fixed in SVN TYPO3core trunk revision 2869. See patch attached to issue #6961.