In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Editor to share with you the method of replacing the home page by phpcms. I hope you will gain a lot after reading this article. Let's discuss it together.
How to replace the home page with phpcms:
First of all, make a static enterprise site home page:
Ul li {list-style: none; display: block; position: relative; float: left; width: 100px;} ul {height: 50px;} .base {color: # 000000 } .col {color: # 0000FF;} ul li a {text-decoration: none;} # header {width: 1200px; height: 50px; border: solid 2px # 0000000;} # footer {width: 1200px Height: 50px; border: solid 2px # 000000;} .list {position: relative; width: 500px; height: 250px; margin-left: 50px; border: solid 2px # 000000; margin-top: 10px; float: left } # content {width: 1200px; height: 550px;} Home news bulletin more about us joining us
Corrupt publication.
Announce more
Daniu Fang, Grade 3
About more
Beat you and call you.
Recruit more
Hair follicle troubles
Links 1 links 2 links 3 links 4
Running effect:
Place the JS and CSS files in the web page in the appropriate location under the statics folder.
And modify the file address according to the following format:
Replacement method:
{CSS_PATH} represents the CSS storage path defined by CMS
{JS_PATH} represents the JS storage path defined by CMS
{IMG_PATH} represents the image storage path defined by CMS
First, set up the template to be used
Change the default template in phpcms to your own template.
Create a new English folder in phpcms/install_package/phpcms/templates
Create a content folder under this folder
Modify the .html web page file to index.html and put it in the content folder
Log in to the phpcms backend and you can see the interface-"the newly added template will be displayed in the template style."
Settings-"Select template style in site management, click OK."
Update the cache, after generating the home page
Click on the home page of the site and you will see that the template has been changed successfully:
Second, split the template
Split the template into header code, content code, and trailer code
The content parts created separately as header.html footer.html are still retained in index.html.
Add the code {template "content", "header"} to the index.html header to import header.html
Add the code {template "content", "footer"} at the end of index.html to import footer.html
Third, add columns
In header.html
First add a link to the navigation bar:
Set
News bulletin on the home page about us joining us
Modified to:
{pc:content action= "category" catid= "0" num= "5" siteid= "$siteid" order= "listorder ASC"} Home {loop $data $r} {/ loop} {/ pc}
Num is the maximum number of columns
If you want to increase the navigation monitoring effect, add the code as follows:
{if $top_parentid==0} homepage {else} homepage {/ if} {pc:content action= "category" catid= "0" num= "5" siteid= "$siteid" order= "listorder ASC"} {if $catid==$ r [catid] | | $top_parentid==$ r [catid]} {$rcatename]} {else} {$r [catname]} {/ if} {/ pc}
Display effect:
Add columns:
In the phpcms background, add a column to the content-"Management column"
Add the columns that need to be added, and note that the template in the template settings should be modified to the current template.
Fourth, add content to the column
Modify the code of index.html
Start by adding internal links to more:
Code:
More
The middle number represents the column code in the background of phpcms.
Set dynamic to the content of div:
For more news {pc:content action= "lists" catid= "10" num= "1" siteid= "$siteid" order= "id DESC"} {loop $data $r $val}
{$vale [title]}
{$vale [description]}
{/ loop} {/ pc} after reading this article, I believe you have a certain understanding of the method of replacing the home page of phpcms. Want to know more about it. Welcome to follow the industry information channel. Thank you for your reading!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.