JEECMS Station Group Management System--label use and production of template

Source: Internet
Author: User
Tags dateformat

1 Template Planning 1.1 resource files

The resource file is the image, CSS, JS and other elements used in the Web page, and all the resource files in the CMS system are in the root directory of the website.

/res_base/belongs to the Site definition resource Directory/templeate/web

/res_base/belongs to the Site definition resource Directory/templeate/wap

Explanation: Site Definition Resources

In the CMS system can manage multiple websites, that is, multiple sites can use a CMS system at the same time, but each site has its own separate resource files and template file directory.

1.2 Template files

Defines the main frame of the page display, which is located in the site template directory of/web_inf/user_base/under the root directory of the Web site;

Template rules:

1. The homepage template named after the index prefix

2, the channel prefix named for the column template

3. Content template named after contents prefix

4, named after the alone prefix for the column single page template

1.3 How to use

1. Establish a site using DW

2. Place the resource file categories used in the Web pages in the relevant resources directory

3. Place template files in the relevant template directory of the site according to the naming rules.

4. Place the header, bottom, etc. template files with common elements in the Include directory in the template directory

5. Change all resource references in the template file to the absolute path link to the resource directory

6, in the column management of the template files and columns related settings

7. Place the appropriate label in the template file where you want to extract the data

1.4 Label Call Style

The three code styles that call the "Jeecms tag" are as follows:
A, ${tag name}
B, [@cms. Label name attribute = ' value '/]
C, [@cms. Label name attribute = ' value '; label alias] custom style template [/@cms. Label name]
  For example:
A, ${web.name} tags are used to invoke the site name
b, [@cms. Artilistchnlid= ' count= ' syscontent= ' 1-1 '/] label used to invoke the list of 10 articles

C, [@cms. Chnllist id= ' inner= ' 1 '; C]|<a href== "${c.url}" >>${c.name}</a>[/@cms. Chnllist] tags are used to invoke the column list, which can be used for the site navigation bar.
NOTE: The ABC instance corresponds to the above ABC three form. You can test them individually, extrapolate.

2 include label 2.1 feature brief

As a friend of a website design experience, you may know that we can separate the common parts of the page that are frequently referenced (such as the header and footer) and store them in a single page. The advantage of this is that it can be introduced in a simple inclusion statement on each page that needs to be used in the section, greatly simplifying the workload.

2.2 Tag Description

"Tag name": [@cms. Include attribute = ' value '/]

"Action": contains public pages (such as headers, footers)

"Parameters":

Name: Contains the file name of the template

Solution: Template scheme name

"Example":

Include page header: [@cms. Include name= ' head.html ' solution= ' default '/]

Note: You must first create a corresponding include template before calling this tag

2.3. Clear label Use range

Before we use any label, we must be clear about the scope of its use, otherwise it may not work properly.

"Include tag" is used in: Home template, Column page template, content page template, that is, the corresponding \web-inf\user_base\jeecms_com_www\template\article\default\ folder under the Index_xx . html templates, channel_xx.html templates, content_xx.html templates

2.4 Debug Tags Learn how to use them

Before using the "include tag" we must ensure that there is a containing template that can be called by this tag, this instance is just a demonstration, and for the sake of convenience, there is no additional template to be created, and the label calls the head.html template in the system default template schema.

Login Jeecms Backstage, go to "template Management->template->article->default", click on the Index_ that was established at the beginning of the modification demo.html Template (if no this template is created according to the instructions at the beginning of this article), enter the template code mode, fill in the following tag code (in order to demonstrate the effect of beautiful, the code in the CSS, can be removed):

<! DOCTYPE HTML PUBLIC "-//w3c//dtd XHTML 1.0transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
<meta http-equiv= "Content-type" content= "text/html;charset=gb2312"/>
<title>include Label Testing </title>
<link href= "${sysresroot}/front.css" type= "Text/css" rel= "stylesheet"/>
<link href= "${root}/default/article/css/whole.css" type= "Text/css" rel= "stylesheet"/>
<link href= "${root}/default/article/css/layout.css" type= "Text/css" rel= "stylesheet"/>

<body>
[@cms. Include name= ' head.html ' solution= ' default '/]
</body>

Click the Save button, and then return to the front page refresh to get the following effect:

3 artilist label 3.1 feature brief

"Artilist tags" in the CMS used in the frequency can be said to be the highest, through this tag, you can not only get a list of articles, but also by different combinations of parameters to get different display results. For example, the article graphics list, text or pictures of the marquee, text or pictures up and down cycle scrolling and so on.

How to use:

[@cms. Artilist chnlid= ' count= ' 5 ' syscontent= ' 1-1 ' titlen= ' + ' lineheight= ' 1 ' dateformat= ' 4 ' dateposition= ' 2 ' headMark= ' 2 ' target= ' 1 '/]

3.2 Tag Description

"Tag name": [@cms. Artilist property = ' value '/]
"Action": Get the article List data

"Parameters":

Property name

Property Description

Default value

Optional values

Chnlid

Column ID, column page does not set, the system will automatically get the current column ID

Current Column ID

Empty: Displays a list of all stations;
Column ID: designated column article

attr

Article Property ID

Empty

1: normal 2: graphic
3: Focus 4: Headlines
5: Scrolling

Syscontent

How the list is displayed

1-1

1-1: General title List
1-2: Graphic List
2-1: Title List Tumbling
2-2: Graphic list tumbling
3-1: Focus Map

By

Sorting method

0

0: Release time descending;
1: Release time ascending;
2: Headspace descending;
3: Sticky descending;
4: Day click Descending;
5: Week click Descending;
6: Month Click Descending;
7: Season click Descending;
8: Year click Descending;
9: Total Click Descending

Recommend

is recommended

0

0: All articles
1: Featured Articles

Titlen

Title length

20

Custom

Target

Link Open target

0

0: The original window opens
1: New window opens

Headmark

Article title icon

0

0: no icon
1: Small black dot
2: Small red dot
3: Blue single Arrow
4: Blue Double Arrow
Custom icon: Fill in the icon path

Lineheight

The row height of each row in the article list

Empty

Custom

Bottomline

Whether to divide lines under each row heading

0

0: No dividing line
1: Default divider Line

Custom styles: style names defined in CSS

Ctgform

Article category Form

0

0: Do not show article category
1: Show Column category
2: Show Site name

Ctgclass

Css-class of article categories

Empty

The class name of the custom CSS style

DateFormat

Article release date display format

0

0: Date not displayed
1: "Year-month-day time-minute-second" format
2: "Year-month-day" format
3: "Month-day time-minute" format
4: "Month-day" format

Dateposition

Date Arrange position

1

1: Immediately after the title
2: Right-justified
3: Align Left

Ispage

Whether to show paging

0

0: No; 1: Yes

Count

Number per page List display

20

Custom

CSSStyle

Style of the connection

Empty

Custom

The following label properties are valid only if syscontent= ' 1-2 ' (graph list)

Picwidth

Show picture width by percentage

25 (that is, each picture occupies 25% of the total width, four pictures per row can be placed)

Custom

Picheight

Height per line of picture display

110

Custom

The following label properties are valid only if syscontent= ' 3-x ' (focus)

Flashwidth

Focus Chart Width

296 (px)

Custom

Flashheight

Total height of focus graph

(px)

Custom

TextHeight

Focus Graph Text Height

(px)

Custom

The following label properties are valid only if syscontent= ' 2-x ' (effects display)

Rolldisplayheight

Display area Height

28

Custom

Rolllineheight

Row height

28

Custom

Rollcols

Number of columns (a row contains several columns)

1

Custom

Rollspeed

Scrolling speed, the smaller the value, the faster, the minimum is 1

1

Custom

Issleep

Whether to pause

1

0: no pauses;
1: Pause

Rollsleeptime

Pause time, the greater the value, the longer it stops.

50

Custom

Rollcount

Number of rows to scroll at a time

1

Custom

Rollspan

A single scrolling pixel

1

Custom

Other Advanced tab properties (for user personality settings)

Searchkey

Search for page templates by searching for a list of articles in the title, tags, and description for the specified keyword

Empty

Custom keywords

Style

Label inner style, which is invalid if syscontent or usercontent is specified

1

1: General List

Systpl

Specifying system templates

1

Custom

Syscontent

System content Style

0

Custom

Usercontent

User Content style, valid when syscontent=1

Empty

Custom

Syspage

System Paging Style

0

Custom

Userpage

User paging style, valid when syspage=1

Empty

Custom

Upsolution

Specify a different template scheme style

Empty

Custom

Upwebres

Specify a different site style

Empty

Custom

Pageclass

The class name of the page bar CSS style

Empty

Custom

Pagestyle

Page bar CSS Custom style style

Empty

Custom

3.3 Clear label Use range

Before we use any label, we must be clear about the scope of its use, otherwise it may not work properly.

" artilist the scope of use of the label is: Homepage template, column page template, content page template, that corresponds \web-inf\user_base\jeecms_com_www\template\article\default\ folder under the index_ xx . html templates, Channel_ xx . html templates, Content_ xx . html Templates

3.4 Debug Tags Learn how to use them

Login Jeecms backstage, go to "template management ->template->article->default " , Click Edit to start the index_demo.html template (If this template is not created according to the instructions at the beginning of this article), fill in the following tag code in the template content (for a good presentation, the system default is introduced in our code CSS , can be removed): ( 1 ). List of articles

<link href= "${sysresroot}/front.css" type= "Text/css" rel= "stylesheet"/>
[@cms. Artilist chnlid= ' count= ' 5 ' syscontent= ' 1-1 ' titlen= ' + ' lineheight= ' 1 ' dateformat= ' 4 ' dateposition= ' 2 ' headMark= ' 2 target= ' 1 '/]

Click the Save button, and then return to the front page refresh to get the following effect:

( 2 ). Graphic list

<link href= "${sysresroot}/front.css" type= "Text/css" rel= "stylesheet/>
[@cms. Artilist chnlid= ' attr= ' 2 ' count= ' 5 ' syscontent= ' 1-2 ' titlen= ' "target= ' 1 ' picwidth= '" picheight= ' 110 '/]

Click the Save button, and then return to the front page refresh to get the following effect:

4 Position Label 4.1 feature Brief

In the site page we often want to display the current page location, for example: Current location: Home > Wireless City > City News > Text. In the CMS tag provides a display page of the current location call tag, just put the label in the corresponding place of the page, set the call parameters can be simple and convenient.

4.2 Tag Description

"Tag name": [@cms. Position property = ' value '/]
"Action": Displays the current position of the page
"Parameters":
homepage--Home display mode. "1: site abbreviation; custom" (Default: Home)
Title---How the content page is displayed. "0: not displayed; 1: Display content title; custom" (Default: Body)
Split---split symbol. (Default: ">")
Target---whether the original window is open. "0: the original window opens; 1: New window Opens" (Default: The original window opens)
Class---Link external style, equivalent to the class attribute in HTML
Style---Custom label style, equivalent to the Style property in HTML
"Example":
[@cms. Positionhomepage= ' 1 ' split= ' | ' target= ' 1 ' style= ' color: #f00 '/]
Final effect:

5 chnllist label 5.1 feature Brief

We need to use [@cms when we get the list of columns in the page. Chnllist/] Label, this label can not only be used alone, but also can be used with other labels to achieve a richer effect.

5.2 Tag Description

"Tag name": [@cms. Chnllist property = ' value '/]
"Action": Displays the list of columns
"Parameters":

Property name

Property Description

Default value

Optional values

Id

Parent Column ID

Default is null: Automatically get the current column ID

NULL: Current column ID;

Column ID: Specify the parent column ID

By

Sorting method

0

0: Priority ascending;

1: Priority descending;

2: Number of clicks ascending; 3: number of clicks descending

Isdisplay

Whether to get only the displayed columns

1

0: Get all;

1: Get only the displayed columns

Hascontent

Whether to get only columns that can have content

0

0: Get all;

1: Get only the columns that can have content

Linkclass

Link class style

Empty

LinkTarget

Link Open mode

0

0: Current window;

1: New Window

Syspage

System Paging Style

0

0: No paging;

1: Style one;

2: Style Two

Userpage

Customize the page-out style. If a system paging style is specified, the entry is not valid

0

0: No paging;

1: Style one;

2: Style Two

5.3. Clear label Use range

Before we use any label, we must be clear about the scope of its use, otherwise it may not work properly. [@cms. Chnllist/] Tags use the scope is: Home template, Column page template, that corresponds to the \web-inf\user_base\jeecms_com_www\template\article\default\ folder Index_xx. HTML templates, channel_xx.html templates

5.4 Debug Tags Learn how to use them

1. Example of individual tag invocation: [@cms. chnllist/]

2. Custom Tag Invocation Example:
[@cms. Chnllistid= ' inner= ' 1 '; C,i]
<ahref= "${c.url}" >${c.name}</a>[#if (i+1)%2==0]<br/>[/#if]
[/@cms. Chnllist]

3, with other tags nested invocation example:
[@cms. Chnllist id= ' systype= ' article ' hascontent= ' 1 ' inner= ' 1 '; c]
<table width= "border=" 0 "cellpadding=" 0 "cellspacing=" 1 "bgcolor=" #eee ">
<tr>
<TD height= "bgcolor=" #EEEEEE "><atarget=" _blank "href=" ${c.url} ">${c.name}</a></td>
</tr>
<tr>
<TD bgcolor= "#FFFFFF" >[@cms. Artilist chnlid=c.idsyscontent= ' 1-1 ' titlen= ' count= ' 6 '/]</td>
</tr>
</table>
[/@cms. Chnllist]

6 content page Common label 6.1 tag description

"Article navigation": [@cms. Position/]

"article title": ${arti.title}

"Short title": ${arti.shorttitle}

"article author": ${arti.author}

"Release date": ${arti.releasedate}

"Views": ${arti.visittotal}

"Article source": ${arti.origin}

"Article Summary": ${arti.description}

"Article content": ${arti.content}

JEECMS Station Group Management System--label use and production of template

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.