DZ template production, a little bit very nonsense! is the Forum homepage and plate partition are all used discuz.htm as a template! In this case, if you want to make the Forum home page and plate partition using different templates is very troublesome, after one hours of research, found two methods:
The first kind, is into the background plate management inside the template, this method is more troublesome to use, no longer say.
The second method is to use PHP to determine the modification of discuz.htm
After observing the discuz.htm inside there
- <!--{if empty ($gid)}-->
- Content..........
- <!--{/if}--
The general sense of the above is that if the post comes to the gig if it is empty, execute the code inside ... Do you understand me? Forum homepage is/forum.php, plate page is forum.php?gid=xxx, that is, only the GID of the homepage is empty, only the plate partition has GID. Here's how to modify it:
We just need to
class = "MN" This div is put in
- <!--{if empty ($gid)}-->
- Content..........
- <!--{/if}--
This can be done in this way, so that the plate partitions are only displayed on the home page
Then plate partitioning uses the following code to
- &NBSP;
- <! --the partition template starts-->
- <!--{if $gid! = ""}--> /span>
- <!--[diy=diy_muban]--> <div id= "Diy_muban" class= "area" >< /div><!--[/diy]-->
- <!--{/if}-->
- <!--partition template end-->
- &NBSP;
The above code means that when the plate GID is not equal to empty when the DIY template is displayed, that is, only in the plate partition will display the above DIY template.
Then is to enter the plate to be modified to distinguish, and then add a DIY template, save the time must choose to apply only to the current page, and then modify the CSS on the line!
Discuz Forum homepage and plate partitioning using different templates