Powermail missing absolute links in mails when in lists <ul> - typo3

Powermail use lib.parseFunc_powermail, to parse the content of mail to sender and receiver. This converts the URLs into absolute URLs and it works.
If URLs are inside of a list this doesn't work anymore. All URLs in the mails are relative.
My tries to change TypoScript config:
# ParseFunc Configuration for using FAL links in receiver and sender mail
lib.parseFunc_powermail < lib.parseFunc_RTE
lib.parseFunc_powermail.tags.link.typolink.forceAbsoluteUrl = 1
lib.parseFunc_powermail.tags.a.typolink.forceAbsoluteUrl = 1
# extended with
lib.parseFunc_powermail.tags.li.stdWrap.parseFunc = < lib.parseFunc_powermail
No result. Other tries.
lib.parseFunc_powermail.tags.li.callRecursive = 1
lib.parseFunc_powermail.externalBlocks.li.stdWrap.parseFunc < lib.parseFunc_powermail
lib.parseFunc_powermail.externalBlocks.li.stdWrap.parseFunc.tags.a.typolink.forceAbsoluteUrl = 1
lib.parseFunc_powermail.externalBlocks.li.parseFunc.tags.a.typolink.forceAbsoluteUrl = 1
lib.parseFunc_powermail.externalBlocks.li.stdWrap.parseFunc.tags.link.typolink.forceAbsoluteUrl = 1
lib.parseFunc_powermail.externalBlocks.li.stdWrap.parseFunc.tags.a.typolink.forceAbsoluteUrl = 1
lib.parseFunc_powermail.externalBlocks.ul.stdWrap.parseFunc.tags.li.stdWrap.parseFunc.tags.a.typolink.forceAbsoluteUrl = 1
lib.parseFunc_powermail.externalBlocks.ul.stdWrap.parseFunc.tags.li.stdWrap.parseFunc.tags.link.typolink.forceAbsoluteUrl = 1
lib.parseFunc_powermail.tags.li.stdWrap.parseFunc.tags.link.typolink.forceAbsoluteUrl = 1
lib.parseFunc_powermail.tags.li.stdWrap.parseFunc.tags.a.typolink.forceAbsoluteUrl = 1
lib.parseFunc_powermail.tags.ul.stdWrap.parseFunc.tags.li.stdWrap.parseFunc.tags.a.typolink.forceAbsoluteUrl = 1
lib.parseFunc_powermail.tags.ul.stdWrap.parseFunc.tags.li.stdWrap.parseFunc.tags.link.typolink.forceAbsoluteUrl = 1
Does anyone have a tip on how to configure this properly?
Greetings, Heinz

Related

TYPO3 split different wrap for first line using optionSplit

I am getting the text from the abstract field and splitting it by new line.
What I want is to wrap the first line in an H5 tag and all lines after in P tags.
This is what I have tried:
tt_content.menu.20.102 = HMENU
tt_content.menu.20.102 {
1 = TMENU
1 {
NO = 1
NO {
doNotLinkIt = 1
stdWrap.cObject = COA
stdWrap.cObject {
50 = TEXT
50.stdWrap {
field = abstract
split {
token.char = 10
cObjNum = 1 || 2
1.current = 1
1.wrap = <h5>|</h5>
2.current = 1
2.wrap = <p>|</p>
}
}
}
}
}
}
But it wraps all the lines in H5... How do I make this work?
I found a bug report that mentions this issue here: https://forge.typo3.org/issues/59533
It seems the best workaround that I can see is to instead use listNum
This has the obvious drawback of only working with a limited number of paragraphs but at least it sort of works.
10 = TEXT
10.field = abstract
10.wrap = <h5>|</h5>
10.listNum = 0
10.listNum.splitChar = 10
20 < .10
20.wrap = <p>|</p>
20.listNum = 1
30 < .20
30.listNum = 2
Just a combination of both, the original code and the listNum workaround should do the job. Still have to find a way to get the rest of the first "split" into the second one. So consider this answer to be WIP please. We are still discussing it on our Coders.Care Twitch channel in the TYPO3 service station.
10 = TEXT
10.field = abstract
10.wrap = <h5>|</h5>
10.listNum = 0
10.listNum.splitChar = 10
20 < .10
20.listNum = 1
20.split {
token.char = 10
cObjNum = 1
1.current = 1
1.wrap = <p>|</p>
}

TYPO3 does not cache the page

My TYPO3 6.2.31 page has everywhere enabled caching ... But when I call the Page and look in admin panel ..
My typoscript looks like this:
config {
doctype = html5
renderCharset = utf-8
metaCharset = utf-8
prefixLocalAnchors = all
simulateStaticDocuments = 0
tx_realurl_enable = 1
absRefPrefix = /
#CACHE AND INDEX
no_cache = 0
no_search = 0
index_enable = 1
index_externals = 1
what could be the problem for not caching my site?
prefixLocalAnchors causes the page to be not cached!
Set prefixLocalAnchors = 0
There are a lot of things which incluence if a page is cached or not:
an extension
TS like page.config.no_cache = 1
disable caching in the page properties
and I guess some more as well.

List of images as subpart in Typo3

At current I'm making a list of images for a banner slider using code as follows:
page.10.marks.topimage = IMAGE
page.10.marks.topimage {
file.import.data = levelmedia: -1, "slide"
file.import = fileadmin/user_upload/
file.import.override.field = media
file.import.current = 1
file.import.listNum = 0
border = 0
file.height = 670
file.width = 1800
altText = Banner
titleText = Banner
wrap = <div id="slides">|
}
page.10.marks.topimage1 = IMAGE
page.10.marks.topimage1 {
file.import.data = levelmedia: -1, "slide"
file.import = fileadmin/user_upload/
file.import.override.field = media
file.import.current = 1
file.import.listNum = 1
border = 0
file.height = 670
file.width = 1800
altText = Banner
titleText = Banner
}
etc...
However, this means, every time the other admins want to add a new slide or remove one from the total count, I have to change this code. Adding the content of the slides is not a problem, they simply upload to user_upload and it pulls 0 to 3 at current. However, they want to be able to upload 5 images and have it show 5 or just 3 and have it show 3 and I need a more dynamic way to implement this. I'm still new to Typo3 (i really don't understand it, php is 10,000X easier!), so if anyone could, please explain to me better than the docs, how subparts work or what my solution might be.
And no I can't just write an extension to do it. Been there and tried that and still can't figure out how to get extensions in without breaking it.
FYI, if you could break it down and help me "like" it, that would be great, because at current, I'd rather they use wordpress or joomla or ANYTHING but this. If you've seen my other questions, then you'll realize, i've had 0 fun working with this cms and mostly because the documentation and/or "help" i've received has been almost completely useless to me. I only mention this so that maybe someone will break this down for me like i break down jquery/php/.net questions for others. It doesn't hurt to be polite and show a nub "step-by-step" instructions!
page.10.marks.topimage = TEXT
page.10.marks.topimage {
# retrieve data
data = levelmedia: -1, "slide"
override.field = media
# we have some filenames in a list, let us split the list
# and create images one by one
# if there are five images selected, the CARRAY "1" will be executed
# five times where current is loaded with only one filename
split {
# the images are separated via ","
token = ,
# you can do funny stuff with options split, f.e. if you want to give first
# and last image a different class... but thats another topic;)
# we just say, render every splitted object via CARRAY "1"
cObjNum = 1
1 {
# just render the single image,
# now there should be one filename in current only
10 = IMAGE
10 {
file.import.wrap = fileadmin/user_upload/|
file.import.current = 1
border = 0
file.height = 670
file.width = 1800
altText = Banner
titleText = Banner
}
}
}
}

How to setup a browse menu to cycle a page and it's sub pages only in typo3?

I am trying to set up a browse menu to cycle a page and it's sub pages. I have to have it in the format of < 2 > where < is the previous page, 2 is the current page, and > is the next page. To reslove this I decided to put an extension template on the parent page which in which a browse menu points to the first page of the sub page tree:
lib.pagenumber = HMENU
lib.pagenumber{
special = browse
special.items = | next
special.next.uid = 100
special.next.fields.title = 2
1 = TMENU
1{
noBlur = 1
expAll = 0
NO = 1
NO.ATagTitle = 1
NO.before = <div id="currLGMpg" class= "currpg">1</div>
NO.linkWrap = <div class=nextLGMpg>|</div>
}
}
The current page is not linked but just an image box which has to be between the prev and next links and also be auto numbered. this is the second problem I am trying to solve.
For the subpages I am thinking that a template on the first subpage with option split on the linkwrap would work for styling the prev and next links but I have no idea how to put the image for the current page in the middle.
Hello for cycling you should follows the below steps this only for next please follow same steps for prev.
temp.lightbox_navi.30 = HMENU
temp.lightbox_navi.30 {
stdWrap.wrap = <li>|</li>
special = browse
special {
items = next
items.prevnextToSection = 0
next.fields.title = < next Projekt
}
1 = TMENU
1 {
NO = 1
}
stdWrap.ifEmpty.cObject = HMENU
stdWrap.ifEmpty.cObject {
special = browse
special {
items = first
items.prevnextToSection = 0
first.fields.title = < next Projekt o
}
1 = TMENU
1 {
NO = 1
}
}
}
So I finally solved all but one issue. which is to auto number the page. For those interested, you need to map the next and prev separately to so that you can put a page number button inbetween. The following typoscript code sits on the root page tree of the pages you want to setup browse buttons for:
#Next page button setup
lib.nextpage = HMENU
lib.nextpage.special = browse
lib.nextpage.special.items = next
#can't remove the page title some reason it just gets inserted back so we set it to nothing
lib.nextpage.special.next.fields.title =
#if we're on the parent page of the page tree we wish to browse next should point to the first page of the subtree.
[globalVar = TSFE:id = 46]
lib.nextpage.special.next.uid = 100
[global]
lib.nextpage.1 = TMENU
lib.nextpage.1{
noBlur = 1
expAll = 0
NO = 1
#NO.ATagTitle = 1
NO.linkWrap = <div class=nextLGMpg>|</div>
}
#Page number
lib.currpage = TEXT
#can't autonumber yet so put a 1 as a placeholder for the current page number
lib.currpage.value = 1
lib.currpage.wrap = <div id="currLGMpg">|</div>
#previous page button setup
#copy from next page setup; tbh all we gain is 1 less line code
lib.prevpage < lib.nextpage
lib.prevpage.special.items = prev
lib.prevpage.special.prev.fields.title =
#again if we're at the 1st subpage we need to target the parent page as that is page one.
[globalVar = TSFE:id = 100]
lib.prevpage.special.prev.uid = 46
#next line tests to see if we're at page 1. If we are we remove the prev object because browsing stops here.
[globalVar = TSFE:id = 46]
lib.prevpage >
[global]
lib.prevpage.1 = TMENU
lib.prevpage.1{
noBlur = 1
expAll = 0
NO = 1
#NO.ATagTitle = 1
NO.linkWrap = <div class=prevLGMpg>|</div>
}
Once I figure out how to autonumber I will update the answer.

Typoscript - Splitting "media" and "imagecaption" simultaneously

I have made a plugin where I store many images in the "media" field and jsut as many captions in the field "imagecaption".
Now my wish is to display it like this:
image1.png
caption 1
image2.png
caption 2
image3.png
caption 3
This is how ive been trying to do it, but its not working:
plugin.tx_myplugin_pi1 = COA
plugin.tx_myplugin_pi1{
10 = TEXT
10.field = header
10.wrap = <h1>|</h1>
20 = COA
20{
10 = TEXT
10{
field = media
split{
token = ,
cObjNum = 1
1.current = 1
}
}
20 = TEXT
20{
field = imagecaption
split{
token.char = 10
cObjNum = 1
1.current = 1
}
}
}
}
But its not really working, as it shows first all the filenames and then the caption.
How could I do it?
Split is a function which returns all elements. Within 20.10 you get the content of field image, splitted by an newline f.e. and after that, you get the content of 20.20 which has the imagecaption.
What you need to do (untested):
10 = TEXT
10{
field = media
split{
token = ,
cObjNum = 1
1.current = 1
# for each image, add the imagecaption
1.append = TEXT
1.append {
field = imagecaption
# split saves the index in REGISTER:SPLIT_COUNT
listNum.stdWrap.data = REGISTER:SPLIT_COUNT
listNum.splitChar = 10
}
}
}
I do not think that token = \n is correct. You properly need to use .char = 10.
Also you will need to nest your TS somehow, because the current solution does handle the fields one by one.
I can't remember at the moment but I've wrote an extension that adds a frame to a picture and caption. It can solve your problem with the captions: http://typo3.org/extensions/repository/view/ch_imgtext_renderengine/current/.