I have a contact popup which is displayed when the user clicks on a side button. The layer should have a link at the bottom right corner and for this, I want to use the header_link field from tt_content. But I don't want to link the header also.
So, how can I get a CONTENT without header?
lib.contactLayer = COA
lib.contactLayer {
10 = TEXT
10.value = <a id="contactHandle" href="#"></a>
20 = COA
20 {
10 = CONTENT
10 {
table = tt_content
select {
pidInList = {$storageFolder.records}
uidInList = {$record.contactLayer}
orderBy = sorting
}
}
20 = TEXT
20.value = <a href="#" id="contactLayerClose"></a>
30 = CONTENT
30 {
table = tt_content
select {
pidInList = {$storageFolder.records}
uidInList = {$record.contactLayer}
orderBy = sorting
}
renderObj = COA
renderObj {
10 = TEXT
10 {
value = Kontakt aufnehmen
stdWrap.typolink {
parameter.field = header_link
wrap (
<span id="contactLayerLinkText">|</span>
<span class="icon"></span>
)
ATagBeforeWrap = 1
ATagParams = id="contactLayerLink" class="clearfix"
}
}
}
}
wrap = <section id="contactLayer">|</section>
}
}
EDIT: My approach was wrong from the beginning, because I was making 2 sql queries. This is the one I ended up with, using one CONTENT and renderObj:
lib.contactLayer = COA
lib.contactLayer {
10 = TEXT
10.value = <a id="contactHandle" href="#"></a>
20 = COA
20 {
10 = CONTENT
10 {
table = tt_content
select {
pidInList = {$storageFolder.records}
uidInList = {$record.contactLayer}
orderBy = sorting
}
renderObj = COA
renderObj {
10 = TEXT
10.value = <a href="#" id="contactLayerClose"></a>
20 = FILES
20 {
references {
table = tt_content
uid.field = uid
fieldName = image
}
renderObj = IMAGE
renderObj {
file.import.data = file:current:publicUrl
}
}
30 = COA
30 {
10 = TEXT
10.field = header
10.wrap = <h1>|</h1>
20 = TEXT
20.field = subheader
20.wrap = <h2>|</h2>
30 = TEXT
30.field = bodytext
wrap = <div class="text">|</div>
}
40 = TEXT
40 {
value = Kontakt aufnehmen
stdWrap.typolink {
parameter.field = header_link
wrap (
<span id="contactLayerLinkText">|</span>
<span class="icon"></span>
)
ATagBeforeWrap = 1
ATagParams = id="contactLayerLink" class="clearfix"
}
}
}
}
wrap = <section id="contactLayer">|</section>
}
}
My approach was wrong from the beginning, because I was making 2 sql queries. This is the one I ended up with, using one CONTENT and renderObj:
lib.contactLayer = COA
lib.contactLayer {
10 = TEXT
10.value = <a id="contactHandle" href="#"></a>
20 = COA
20 {
10 = CONTENT
10 {
table = tt_content
select {
pidInList = {$storageFolder.records}
uidInList = {$record.contactLayer}
orderBy = sorting
}
renderObj = COA
renderObj {
10 = TEXT
10.value = <a href="#" id="contactLayerClose"></a>
20 = FILES
20 {
references {
table = tt_content
uid.field = uid
fieldName = image
}
renderObj = IMAGE
renderObj {
file.import.data = file:current:publicUrl
}
}
30 = COA
30 {
10 = TEXT
10.field = header
10.wrap = <h1>|</h1>
20 = TEXT
20.field = subheader
20.wrap = <h2>|</h2>
30 = TEXT
30.field = bodytext
wrap = <div class="text">|</div>
}
40 = TEXT
40 {
value = Kontakt aufnehmen
stdWrap.typolink {
parameter.field = header_link
wrap (
<span id="contactLayerLinkText">|</span>
<span class="icon"></span>
)
ATagBeforeWrap = 1
ATagParams = id="contactLayerLink" class="clearfix"
}
}
}
}
wrap = <section id="contactLayer">|</section>
}
}