这很容易.
index.html
至 index.ctp
通常,大多数模板的设置如下:
<html>
<head>
<title>My Site</title>
// You will include your javascript and css files here
<?php
echo $this->Html->css(array('cake.generic','default'));
echo $this->Html->script(array('myscript','jquery'));
?>
</head>
<body>
<div id="container">
<div id="header"></div>
<div id="body">
<div id="main_content" style="width:600px;float:left">
<?php
//Code for this should be in your home.ctp
// in your pages folder. Usually I cut this content from
// my template and place the whole thing in that file
// everything else happens magically
echo $content_for_layout;
?>
</div>
<div id="side_content" style="width:300px;float:left">
<!-- You can have content here manually or create elements and include them here like the following -->
<?php $this->element("sidebar_content"); ?>
</div>
</div>
<div id="footer">...</div>
</div>
</body>
Run Code Online (Sandbox Code Playgroud)
然后,您应该将所有图像上传到/img
文件夹中的/app/webroot
文件夹
将图像路径更改为参考/img
文件夹.
您必须对所有CSS和JS文件执行相同的操作.将它们放在该/app/webroot
位置的相应文件夹中.
祝好运!
归档时间: |
|
查看次数: |
10577 次 |
最近记录: |