Skip to content

Instantly share code, notes, and snippets.

@sonicdoe
Created July 18, 2012 17:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sonicdoe/3137493 to your computer and use it in GitHub Desktop.
Save sonicdoe/3137493 to your computer and use it in GitHub Desktop.
TypoGento Routing Configuration
config.tx_typogento {
routes {
10 {
# Set the dispatch section
section = dispatch
# The default priority is 0
priority = 1
# The route will taken if the filter matches and the route has the
# highest priority (see http://wiki.typo3.org/TSref/if)
filter {
# Match for a TYPO3 page with the id {$pid}
value.data = TSFE:id
equals = 3
}
# The resulting URL of this external typolink will be dispatched
# to Magento (see http://wiki.typo3.org/TSref/typolink)
target {
# The dispatch section requires always external links
parameter.cObject = TEXT
parameter.cObject {
# Targets the Magento product view
wrap = mage:/catalog/product/view/id/|/
data = GP:id // register:tx_typogento.content.id
if.isTrue.data = GP:id // register:tx_typogento.content.id
}
# Also available for external links
addQueryString = 1
addQueryString.exclude = route,controller,action
}
}
20 {
# Set the render section
section = render
# The default priority is 0
priority = 1
# The route will taken if the filter match and the route has the
# highest priority (see http://wiki.typo3.org/TSref/if)
filter {
# Match for all Magento URLs starting with '/catalog/product/'
value.dataWrap = /{GP:route}/{GP:controller}/
equals = /catalog/product/
}
# The resulting URL of this internal typolink will be rendered
# on the TYPO3 frontend (see http://wiki.typo3.org/TSref/typolink)
target {
# Targets a TYPO3 page with the id {$pid}
parameter = 3
# Remove route path from the URL
addQueryString = 1
addQueryString.exclude = tx_typogento[route],tx_typogento[controller],tx_typogento[action]
useCacheHash = 1
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment