I can’t use them because I’m using “ShinePdf” an addon for creating PDFs on the fly from channel entries… I need to put data from a related channel into the pdf, but embeding or anything else is not possible within the addon tags…
My code: Maybe you’ll see, what I’m trying to achieve…
{exp:query
sql="
SELECT exp_channel_data.field_id_11, exp_channel_titles.title
FROM exp_channel_titles
JOIN exp_channel_data ON exp_channel_data.entry_id = exp_channel_titles.entry_id
JOIN exp_relationships ON exp_channel_data.entry_id = exp_relationships.rel_child_id
WHERE exp_channel_titles.url_title = '{segment_2}'
"}
<?php
$test= "{title}";
?>
{/exp:query}
{!--
{exp:shine_pdf:make
channel="jobs"
url_title="{segment_2}"
format="A4"
default_font_size="11"
default_font="Helvetica"
margin_left="15"
margin_right="15"
margin_top="16"
margin_bottom="16"
margin_header="9"
margin_footer="9"
orientation="p"
margin_top_auto="no"
margin_bottom_auto="no"
}
<style>
p, h2, li {
color:#666;
}
</style>
images/interface/qunit_logo_pdf.jpg
<h2>{jobs_bezeichnung}</h2>
<p>{jobs_text}<br />
<?php echo $test ?><br />
{/exp:shine_pdf:make}<br />
--}
With your Code and Template-Debugging turned on, I’m getting this right sql-syntax:
(0.007550 / 4.35MB) Tag: {exp:query sql=" SELECT exp_channel_data.field_id_11, exp_channel_titles.title FROM exp_channel_titles JOIN exp_channel_data ON exp_channel_data.entry_id = exp_channel_titles.entry_id JOIN exp_relationships ON exp_channel_data.entry_id = exp_relationships.rel_child_id WHERE exp_channel_titles.url_title = 'teamassistentin_m_w_chemiekonzern' "}
But I’m not getting any results… but there ARE entries! Maybe this is not getting the right Query for getting a related record?