Reputation: 27
Say we have a Text/Images record and go to "Images & Captions" and then to "Alternative Labels (one per line)".
I would like something like this: "this is the alt image info for {page:title}."
Using {page:title} in the "main" page elements like "General>Header" works, but not for "Images>Alternative Labels (one per line)"
Also, would the solution to the above work similarly "{page:title}" in the RTEtextarea?
Upvotes: 1
Views: 1244
Reputation: 3631
This lines of coude should do the same thing.
tt_content.image.20.1.altText.append = TEXT
tt_content.image.20.1.altText.append {
noTrimWrap = | ||
data = page:title
}
If the editor should be able to set {page:title} of its own, just set
tt_content.image.20.1.altText.insertData = 1
Upvotes: 0
Reputation: 9671
If I understood your question correctly, this will do:
temp.altText >
temp.altText < tt_content.image.20.1.altText
tt_content.image.20.1.altText >
tt_content.image.20.1.altText.cObject = COA
tt_content.image.20.1.altText.cObject {
10 < temp.altText
20 = TEXT
20 {
noTrimWrap = | | |
data = page:title
}
}
It uses the original alt attributes and appends the page title of the current page.
I don't know about a way to accomplish that in inline RTE images though. The alt text is set within the sourcecode, image tags are not specifically parsed by lib.parseFunc_RTE
during the rendering process
Upvotes: 1