Log in

View Full Version : New Template


Virtex-II
10-20-2006, 07:43 AM
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:

$pagenav

How can I call my new template? If I try the same call it doesn't work.

I found this article (https://vborg.vbsupport.ru/showthread.php?t=119933) 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:

<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>&laquo;</strong> $vbphrase[first]</a></td></if>
<if condition="$show['prev']"><td class="alt1"><a class="smallfont" href="$address<if condition="$prevpage != 1">&amp;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>">&lt;</a></td></if>
$pagenav
<if condition="$show['next']"><td class="alt1"><a class="smallfont" href="$address&amp;page=$nextpage$address2" title="$vbphrase[next_page] - <phrase 1="$nextnumbers[first]" 2="$nextnumbers[last]" 3="$total">$vbphrase[results_x_to_y_of_z]</phrase>">&gt;</a></td></if>
<if condition="$show['last']"><td class="alt1"><a class="smallfont" href="$address&amp;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>&raquo;</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:

$globaltemplates[] = 'pagenav_left';

used in cache_templates


eval('$pagenav_left = "' . fetch_template('pagenav_left') . '";');

used in global_start


This doesn't work. Can someone help me please?


Best Regards

error_22
10-25-2006, 08:05 PM
take a look at this thread:

https://vborg.vbsupport.ru/showthread.php?t=62164

Hope that helps

Niklas