Virtex-II |
10-20-2006 07:43 AM |
New Template
How can I use a new template created for a specific function? I see, for example, that a pagenav template exits and it is called by:
How can I call my new template? If I try the same call it doesn't work.
I found this article and tried to do as it says but got a problem. What I am trying to realize is a lefted pagenav to use it only in some at the end of the showthread page. I created the template and called it pagenav_left. Then I followed the procedure described in that thread and created the two plugins (one in cache_templates and the second in global_start).
That's the pagenav_left template:
PHP Code:
<div class="pagenav" align="$stylevar[left]"> <table class="tborder" cellpadding="3" cellspacing="$stylevar[cellspacing]" border="0"> <tr> <td class="vbmenu_control" style="font-weight:normal"><phrase 1="$pagenumber" 2="$totalpages">$vbphrase[page_x_of_y]</phrase></td> <if condition="$show['first']"><td class="alt1"><a class="smallfont" href="$address$address2" title="$vbphrase[first_page] - <phrase 1="$firstnumbers[first]" 2="$firstnumbers[last]" 3="$total">$vbphrase[results_x_to_y_of_z]</phrase>"><strong>«</strong> $vbphrase[first]</a></td></if> <if condition="$show['prev']"><td class="alt1"><a class="smallfont" href="$address<if condition="$prevpage != 1">&page=$prevpage</if>$address2" title="$vbphrase[prev_page] - <phrase 1="$prevnumbers[first]" 2="$prevnumbers[last]" 3="$total">$vbphrase[results_x_to_y_of_z]</phrase>"><</a></td></if> $pagenav <if condition="$show['next']"><td class="alt1"><a class="smallfont" href="$address&page=$nextpage$address2" title="$vbphrase[next_page] - <phrase 1="$nextnumbers[first]" 2="$nextnumbers[last]" 3="$total">$vbphrase[results_x_to_y_of_z]</phrase>">></a></td></if> <if condition="$show['last']"><td class="alt1"><a class="smallfont" href="$address&page=$totalpages$address2" title="$vbphrase[last_page] - <phrase 1="$lastnumbers[first]" 2="$lastnumbers[last]" 3="$total">$vbphrase[results_x_to_y_of_z]</phrase>">$vbphrase[last] <strong>»</strong></a></td></if> <if condition="$show['popups']"><td class="vbmenu_control" title="$address$address2"><a name="PageNav"></a></td></if> </tr> </table> </div>
and those are the two plugins:
PHP Code:
$globaltemplates[] = 'pagenav_left';
used in cache_templates
PHP Code:
eval('$pagenav_left = "' . fetch_template('pagenav_left') . '";');
used in global_start
This doesn't work. Can someone help me please?
Best Regards
|