Hi,
I want to achieve that a specific content type used for more detailed term description is linked just after the term description. I tried that by including following code into a custom theme function in my template.php:
function phptemplate_tvi_term_description($term) {
$terminfo = views_get_view('term_description_additional'); // GET THE VIEWS
// RUN THE VIEWS WITH TERM-ID AS ARGUMENT
if (is_object($term)) {
return '<div class="tvi-term-desc">' . $term->description . '</div>'. $link;
}
}
One issue I realize is that the view appears in parts if i put the term id directly into the views-function:
$link = $terminfo->execute_display('default', '152');
Leads to follwoing output:
<div class="view view-markenbeschreibungen view-id-markenbeschreibungen view-display-id-default view-dom-id-1" id="markenbeschreibungen">
<div class="views-admin-links views-hide">
<ul class="links"><li class="0 first"><a href="/seeliger/admin/build/views/edit/markenbeschreibungen?destination=taxonomy%2Fterm%2F152#views-tab-default">Bearbeiten</a></li>
<li class="1"><a href="/seeliger/admin/build/views/export/markenbeschreibungen">Exportieren</a></li>
<li class="2 last"><a href="/seeliger/admin/build/views/clone/markenbeschreibungen">Duplizieren</a></li>
</ul> </div>
</div>
Ok - this might be more a views issue (I am still not sure if I can use these function within my template.php. But the first code does not have any result - it seems that $term->id has no value or does not excist. Is it right??? I wanted to get the value of $term used within this theme function but I do not get it: neither with
print $term
nor with
print_r($term)
Can anyone help how I could get the term id in this function? Is there any way to do so??
Greez and thank you very much in advance
Tobias
Comments
Comment #1
tobiberlinSorry for the many mistakes in my post... worked too long today ;-)
Comment #2
duaelfrClosing old issues. Reopen if needed.