多國語言翻譯:

展開 | 闔起

Xoops2.58版佈景功能新增加了【頁尾左】,【頁尾中】,【頁尾右】的區塊功能,

 

 

所以除了原本的區塊外,目前共有11個區塊可以增加,但原本的Xoops佈景只有8個區塊的配置,現在要再增加這三個區塊,所以需要增加以下的語法及檔案設定,方法如下。


1、於佈景檔的theme.tpl(或是theme.html)中的id="footerbar"區塊的前面貼上以下的smarty語法。 

 

 <{if $xoBlocks.footer_left || $xoBlocks.footer_right || $xoBlocks.footer_center}>
        <table>

            <tr>
                <{if $xoBlocks.footer_left}>
                <td id="footerLeft">
                    <{foreach from=$xoBlocks.footer_left item=block}>
                    <{include file="$theme_name/theme_blockfooter.tpl" id=blockfooterl}>
                    <{/foreach}>
                </td>
                <{/if}>


                <{if $xoBlocks.footer_center}>
                <td id="footerCenter">
                    <{foreach from=$xoBlocks.footer_center item=block}>
                    <{include file="$theme_name/theme_blockfooter.tpl" id=blockfooterc}>
                    <{/foreach}>
                </td>
                <{/if}>

                <{if $xoBlocks.footer_right}>
                <td id="footerRight">
                    <{foreach from=$xoBlocks.footer_right item=block}>
                    <{include file="$theme_name/theme_blockfooter.tpl" id=blockfooterr}>
                    <{/foreach}>
                </td>
                <{/if}>

            </tr>
        </table>

        <{/if}>

2、建立一個theme_blockfooter.tpl檔案,放到tpl資料夾中(就是放佈景樣板的資料夾),然後貼上以下的smarty語法。

<{if $id eq "blockfooterl"}>

<div style="padding: 5px;">
    <fieldset>
        <{if $block.title}>
            <legend class="blockTitle"><{$block.title}></legend>
        <{/if}>
        <div class="blockContent"><{$block.content}></div>
    </fieldset>
</div>
<{/if}>




<{if $id eq "blockfooterc"}>

<div style="padding: 5px;">
    <fieldset>
        <{if $block.title}>
            <legend class="blockTitle"><{$block.title}></legend>
        <{/if}>
        <div class="blockContent"><{$block.content}></div>
    </fieldset>
</div>


<{/if}>

<{if $id eq "blockfooterr"}>

<div style="padding: 5px;">
    <fieldset>
        <{if $block.title}>
            <legend class="blockTitle"><{$block.title}></legend>
        <{/if}>
        <div class="blockContent"><{$block.content}></div>
    </fieldset>
</div>
<{/if}>

這樣就能在佈景中顯示【頁尾左】,【頁尾中】,【頁尾右】的區塊內容了

教學撰寫:Neil hsu

neilthemesSimple網站設計開發:Neil網站設計工坊,徐嘉裕Neilhsu
Website CMS by:XOOPS 網站設計:Neil網站設計工坊
營業人名稱:尼爾網站設計工坊 統一編號:37586308
服務專線:0931229118網路電話:07010003568
Do NOT follow this link or you will be banned from the site!