Last active
March 19, 2020 13:46
-
-
Save markhowellsmead/98de3dbaaec2faf52e0863907b5e403e to your computer and use it in GitHub Desktop.
Get news from TYPO3 via Ajax
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Ajax rendering of news: calls content element set in the backend to get content/settings | |
// Example call: http://domain.mhm/index.php?id=71&type=1479807984&recordUid=27 | |
// Required params: id => page.uid, recordUid => tt_content.uid | |
// Returns the data in JSON format | |
// constants.txt | |
plugin.tx_news.settings.ajaxPageType = 1479807984 | |
// setup.txt | |
plugin.tx_news.settings.ajaxPageType = {$plugin.tx_news.settings.ajaxPageType} | |
tx_frpnewsviaajax_pi1 = PAGE | |
tx_frpnewsviaajax_pi1 { | |
typeNum = {$plugin.tx_news.settings.ajaxPageType} | |
config { | |
disableAllHeaderCode = 1 | |
xhtml_cleaning = 0 | |
admPanel = 0 | |
disablePrefixComment = 1 | |
debug = 0 | |
no_cache = 1 | |
additionalHeaders = Content-type:application/json | |
} | |
10 = RECORDS | |
10 { | |
source.data = GP:recordUid | |
source.intval = 1 | |
tables = tt_content | |
dontCheckPid = 1 | |
conf.tt_content =< tt_content.list.20.news_pi1 | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment