Themes

Templates overriding : a small Tutorial

alain01  09-Sep-2006 13:47 12895 Reads   11 Comment(s) 

Didactic Example # 2:

Another example but with the "waiting contents" from the Extensible Waiting Block Module module.

0a 0b 0c 0d Same as example 1

1) First let's download the template block file:
admin system / templates / Waiting Contents Extensible [i]list / line waiting_block_waiting.html, [Download]
<{foreach item=module from=$block.modules}>
<{
$module.name}>
<
ul>
  <{foreach 
item=pending from=$module.pending}>
  <
li>
    <{if 
$pending.pendingnum}>
      <
span style='font-weight:bold;'>
    <{else}>
      <
span style='font-weight:normal;'>
    <{/if}>

      <
a href="<{$pending.adminlink}>"><{$pending.lang_linkname}></a>:<{$pending.pendingnum}>
    </
span>
  </
li>
  <{/foreach}>
</
ul>
<{/foreach}>


2) Let's modify the file you just downloaded and now have locally.
<{foreach item=module from=$block.modules}>
[
color=FF0000]<b>[/color]<{$module.name}>[color=FF0000]</b>[/color]
<
ul>
  <{foreach 
item=pending from=$module.pending}>
  <
li>
      <
a href="<{$pending.adminlink}>"><{$pending.lang_linkname}></a> : 
    <{if 
$pending.pendingnum}>
      [
color=FF0000]<font color=red><b>[/color]<{$pending.pendingnum}>[color=FF0000]</b></font>[/color]
    <{else}>
      <{
$pending.pendingnum}>
    <{/if}>
  </
li>
  <{/foreach}>
</
ul>
[
color=FF0000]<hr />[/color]
<{/foreach}>


3) If my theme is 7dana-soft, via ftp, go to the directory
/themes/dana-soft Let's create the directory modules then down and create directory waiting then down and create directory blocks

4) Let's upload the local file waiting_block_waiting.html to /themes/dana-soft/modules/waiting/blocks/ on the server.

5) Let's delete files in the /template_c directory (except index.html) (or update modules cache) to see the result...
Resized Image <== Default waiting contents bloc - Custum ==>Resized Image

« 1 2 (3) 4 »
Rating 0/5
Rating: 0/5 (0 votes)
Voting is disabled!


Login

Who's Online

242 user(s) are online (8 user(s) are browsing Publisher)


Members: 0


Guests: 242


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits

Categories