how can i create a typolink which:
- reads it's target from a column in
tt_content
(likeheader_link
f.e.) - applies a page type to internal links, but obviously not to external links
f.e., given the values 42
and https://x.org
in header_link
the desired links should look like:
/<path_to_page_id 42>?type=5
https://x.org
i can't figure out how to apply the page type on the condition internal/external link. this is what i got:
text = TEXT
text.value = click here ;-)
text.stdWrap.typolink {
parameter.field = header_link
# following line should only apply if `header_link` is an internal link
parameter.wrap = |,5
}
edit to clarify: above code produces:
/<path_to_page_id 42>?type=5
https://x.org,5 <-- not what i want
how do i get the page type for internal links and leave external links untouched?
Documentation to the TSREF for typolink http://docs.typo3.org/typo3cms/TyposcriptReference/Functions/Typolink/Index.html
adding a page type: