Using phpcms how to make static page into Enterprise website, head plus tail

Source: Internet
Author: User

First, you have to prepare the source file for this static Web page,

BS inside is some CSS and JS files, IMG is to put the picture, the file index is the homepage of the page

Run it and see

That is true

Then open the Phpcms file, mentioned in the previous blog, the home page of the file index to be placed under the specified folder

Put it under this path.

Then run it and see how it works.

There is no picture and style sheet in the page, the next step is to put its picture and style sheet into the specified folder, put the picture in the Images folder,

BS has a JS file also has a CSS file, so put it in CSS and JS file any one can.

The first step is done, copy the file to the specified folder

Run the index home page, or not change,

Then use DW to open Index homepage

The path of some files is original, so can not find, including the picture is

So the second step we're going to do is replace the catalog.

Ctrl F Direct Lookup,

The first thing to replace is BS, to see what to replace.

Turn on PHPCMS admin

Set the basic configuration in the security configuration that item

Let's see what the path is.

Find in DW, fill in content

{Js_path} represents, this path,

Replace, as long as the BS is all replaced with the path, in case there is a word containing BS that will be replaced, so also to change

With double quotes on the front, basically BS, preceded by double quotes.

Click Replace All, found three

has been successfully replaced

The next step is to replace img

Look up IMG and see what the rules are.

It's also a double quotation mark that can be manipulated

Replace all to see if there is a complete replacement success

A class name is also a double quotation mark is replaced, so this substitution method is not possible, undo

The front logo repeats no, so look at the back.

Then replace All

Look, there's nothing wrong with the replacement.

Two paths have been replaced, the webpage should be able to run properly

PHPCMS Background Management Update cache

Once the update is complete, click Generate Home Page

View Site homepage

This static page can be displayed in the Phpcms.

Then you can manipulate this static page.

You can turn static pages into dynamic pages by using some of the tags provided by phpcms.

Another standard point of static Web page to re-operate,

After the run is a static web page like this

or repeat the steps above, copy the file

After the copy is finished, the content changes in index are replaced.

Then update the cache in Phpcms admin, generate home page, view site homepage

Same as the first static page operation step

Next to the index home, two parts, head and tail

Part of the navigation bar is the head, look at the review element

Cut out the Header1 and the contents.

Create a new file, copy the content, the name is also fixed, for the header and then saved to the same path as index

The head is ready, and then the tail is removed.

Look at the bottom again.

The same way, cut Copy to a new file, the name is fixed, footer

Then click Save

Update the cache, generate home page, look at the site home page becomes what looks like

There's no head, you can put your head in there.

Using the label inside the PHPCMS,

Bring the tail in.

Then update the cache to see the effect

The head was successfully introduced

Look at the tail again.

The tail was also successfully introduced

The reason for the head and tail to be removed is that it can be reused, each page needs a head and a tail, and can be introduced if necessary.

The next step is to turn the header into a dynamic

Can you look at

What's the header in this?

There is such a sentence

Title, can be managed in the background operation, cannot write dead, can copy paste a bit

Change this.

I need to add two more words.

Phpcms in the label are curly braces, these two words do not add, plus the best, network optimization with the

And then look down is Logo,logo on the enterprise website is rarely replaced, so here do not do dynamic

Then look down is the column, the column must be changed to dynamic

Just leave these two, and then delete the rest.

Then use the Phpcms label to iterate through the columns.

You can refer to the Phpcms v9 manual to find the label

Curly braces inside the meaning of the content is the PC label, is a shorthand for the phpcms, content represents the contents, the representative of the column to write 0 words to find is a column, 5 is the number of representatives, up to 5 can be adjusted out, is the site

According to the column added in order to ascending row, the equivalent of the king to fill some parameters

How do I find the data to be displayed? Loop label. is used to iterate through an array, the data represents the information found, and R represents the decimal group

Loop in the middle of the content will be circulating output, the product has just put in, the product changed to dynamic, so you can not write products

Write this is the name of the display, first run, to see

What appears is the content of PHPCMS backstage management

There is also a page introduction

Change to Yes, it will appear on the navigation bar

Column has been changed, each column connection is #, now the href address of each column to change

Run for a minute

Click Domestic

Web page jump corresponding to the place

Click About Us

Also jump to the appropriate place to go

Since there are only three files in the Ceshi file, and there is no corresponding list of lists, it will find the default content

The first part of the jump also needs to change

Save run for a bit

Click on the homepage, the URL will not be followed by #

Click here for the homepage

will also return to the homepage

The contents and connections of the navigation have been changed.

Look at how the home page turns yellow.

The home page is a bit more than the other class name

Add a judgment statement above to determine if it is the homepage

Erase this part.

In writing the following judgment statement

It's written in the loop tag.

And then put, this piece, erase it

Run for a minute

can refer to that item, which item is selected, so that the head part has been changed, can be directly from the background management to operate it, next operation footer part

Footer part and head of the same, logo do not change, telephone address and so on, there is a navigation bar, replace this piece

After the modification is complete, run

Click Domestic

Successful jump

Look at the index section again

Because this page, the navigation below is a large map, in order to facilitate later, also changed to dynamic, need to manage the column in the background and add a row of columns

Add Column

Click Submit

Then add content to it

Click Save to see

There's this picture here.

Replace the big picture of the homepage with this one to see how to change

Change the original code to something like this.

Then save, refresh and look

The picture has been successfully replaced.

Manage and modify another picture in the background

Click Save, then refresh the page

The picture was successfully replaced

To the Management column there, delete no use, and then add the column

The navigation has been changed.

The first one is to undertake, to undertake in the management column is 13

The second one is talent, talent in the management column is 11

The third is resources, resources in the management column is 12

The operation is the first page of the large map of three small pictures

Run for a minute

Click Talent, reach the talent page

Run successfully

Other parts, again tomorrow

Using phpcms how to make static page into Enterprise website, head plus tail

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.