To use phpcms to create a corporate website, you must first replace the static corporate homepage with a dynamic homepage that can be edited in the background.
First make a static corporate website homepage:
nbsp;html> <meta> <title></title> <style> 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 #000000; } #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; } </style> <p> </p>
新闻<a>更多</a>
腐败发布啊
公告<a>更多</a>
大牛坊三年级
关于<a>更多</a>
打你叫你
招聘<a>更多</a>
的毛囊烦恼
Operation effect:
Import all the JS and CSS in the web page into JS and CSS files and put them into the corresponding locations 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
1. Set 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
Change the created .html web page file name to index.html and put it into the content folder
Log in to the phpcms backend, you can see the newly added template will be displayed in the interface - "Template style"
Settings -"Select the template style in site management, click OK.
Update the cache and generate the home page
At this time, click on the homepage of the site and you will see that the template has been changed successfully:
2. Split the template
Split the template into headers Header code, content code, and tail code
are newly created as header.html footer.html. The content part is still retained in index.html
Add the code {template "content" to the head of index.html ","header"} to import header.html
Add code {template "content","footer"} at the end of index.html to import footer.html
3. Add a column
In header.html
First add a link to the navigation bar:
Place
Modified to:
{pc:content action="category" catid="0" num="5" siteid="$siteid" order="listorder ASC"}
- 首页 {loop $data $r}
- {$r[catname]} {/loop}
num is the maximum number of columns
If you want to increase the navigation monitoring effect, add the code:
<p> </p>
-
{if $top_parentid==0}
- 首页 {else}
- 首页 {/if} {pc:content action="category" catid="0" num="5" siteid="$siteid" order="listorder ASC"} {if $catid==$r[catid] || $top_parentid==$r[catid]}
- {$r[catname]} {else}
- {$r[catname]} {/if} {/pc}
Display effect:
Only display the homepage
Add column:
In the phpcms background, Content-》Add Column in Management Column
Just add the columns that need to be added. Note that the template in the template settings must be modified to the current template.
Display:
4. Add content to the column
Achieved in the following four p's Dynamic content
#Modify the code of index.html
首先给更多添加内部链接:
代码:
<a>更多</a>
中间的数字代表phpcms后台中栏目代号
给p的内容设置动态:
新闻<a>更多</a> {pc:content action="lists" catid="10" num="1" siteid="$siteid" order="id DESC"} {loop $data $r $val}
{$val[description]}
{/loop} {/pc}
其余三个都是同样的方法
尾部 footer.html也是与头部同样的方法遍历
更多phpcms 替换首页 相关文章请关注PHP中文网!

PHP CMS 是一种基于 PHP 的开源内容管理系统,用于管理网站内容,其特点包括易用性、强大功能、可扩展性、安全性高和免费开源。它可以节省时间、提升网站质量、增强协作并降低开发成本,广泛应用于新闻网站、博客、企业网站、电子商务网站和社区论坛等各种网站。

phpcms跳转到详情页方法:1、使用header函数来生成跳转链接;2、循环遍历内容列表;3、获取内容的标题和详情页链接;4、生成跳转链接即可。

标题:微信登录集成指南:PHPCMS实战在今天的互联网时代,社交化登录已经成为网站必备的功能之一。微信作为国内最流行的社交平台之一,其登录功能也被越来越多的网站所采用。本文将介绍如何在PHPCMS网站中集成微信登录功能,并提供具体的代码示例。第一步:注册微信开放平台账号首先,我们需要在微信开放平台上注册一个开发者账号,申请相应的开发权限。登录[微信开放平台]

PHPCMS 是一款免费开源的内容管理系统 (CMS),特点包括:开放源码、模块化、灵活、用户友好和社区支持。它可用于创建各种类型的网站,包括企业网站、电子商务网站、博客和社区论坛。技术要求包括:PHP 5.6 或更高版本、MySQL、MariaDB 或 PostgreSQL 数据库以及 Apache 或 Nginx Web 服务器。

phpcms不是完全免费的。phpcms属于开源cms系统,但是开源并不等于免费,它有两个版本:免费版和商业版,免费版仅限于个人非商业用途,而商业版需要购买授权;个人可以作为研究使用,如果商业应用,需要支付一定费用。

phpcms用mysql数据库。phpcms是一个PHP开源网站管理系统,采用PHP+MYSQL做为技术基础进行开发。PHPCMS V9采用OOP方式进行基础运行框架搭建,支持的PHP版本是PHP5及以上、支持的MYSQL版本是MySql 4.1以上版本。

很多站长使用PHPCMS进行二次开发建站,PHP中文网特意推出了phpcms视频教程,大家可以随时随地免费观看视频教程,不需要从百度网盘下载,非常方便。

phpcms修改站点名称的方法:1、使用管理员登录后台页面;2、在顶部的菜单栏找到“设置”选项单击,然后在左侧的菜单出找到“站点管理”;3、找到需要修改的站点,点击该站点域名右面的修改链接;4、在弹出的窗口中修改站点名称即可。


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

SublimeText3 Chinese version
Chinese version, very easy to use

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft