Steps for implementing the Chinese-English navigation function of Zhimeng DedeCMS (Figure)

Source: Internet
Author: User
This article describes how to implement the function of Zhimeng DedeCMS in Chinese and English navigation. This article provides detailed operation steps and related implementation code, for more information, see the next article. This article describes how DedeCMS implements the Chinese and English navigation function. This article provides detailed operation steps and related implementation code. For more information, see

Today, I saw a friend in the group who needed to implement the functions of the Chinese and English column names (for example,). let's take a look at how to implement the powerful Zhimeng CMS!

Dedecms Template: www.php1.cn/xiazai/code/dedecms

Find

The code is as follows:

            Topic Name:               

Add

The code is as follows:

              English topic name:                          

Finally, open dede \ catalog_edit.php.

Find

The code is as follows:

$ Upquery = "updat' # separator @ arctype 'set issend = '$ issend', sortrank =' $ sortrank ', typename =' $ typename', typenameng = '$ typenameng ', typedir = '$ typedir', isdefault =' $ isdefault', defaultname = '$ defaname name ',

Add the red part and remove the three separators. now the separator is added.

Call method:

{dede:field name='typenameng'/}

To be used in a channel, for example

The code is as follows:

{dede:channel type='son' row='10' typeid='1'}                    
  • [field:typename/][field:typenameng/]
  • {/dede:channel}


    You also need to modify a file and find include \ taglib \ channel. lib. php.

    Article 1:

    The code is as follows:

    If ($ type = 'top') {$ SQL = "SELECT id, typename, typenameng, typedir, isdefault, ispart, defaultname, namerule2, moresite, siteurl, sitepath From '# separator @ arctype' WHERE reid = 0 And ishidden <> 1 order by sortrank asc limit 0, $ line ";} else if ($ type = 'son ') {if ($ typeid = 0) return ''; $ SQL =" SELECT id, typename, typenameng, typedir, isdefault, ispart, defaultname, namerule2, moresite, siteurl, sitepath From '# separator @ arctype' WHERE reid = '$ typeid' And ishidden <> 1 order by sortrank asc limit 0, $ line ";} else if ($ type = 'self ') {if ($ reid = 0) return ''; $ SQL =" SELECT id, typename, typenameng, typedir, isdefault, ispart, defaultname, namerule2, moresite, siteurl, sitepath FROM '# separator @ arctype' WHERE reid = '$ reid' And ishidden <> 1 order by sortrank asc limit 0, $ line ";}

    Second:

    The code is as follows:

    // If subtopic mode is used, if ($ type = 'son' & $ reid! = 0 & $ totalRow = 0) {$ SQL = "SELECT id, typename, typenameng, typedir, isdefault, ispart, defaultname, namerule2, moresite, siteurl, sitepath FROM '# separator @ arctype' WHERE reid = '$ reid' And ishidden <> 1 order by sortrank asc limit 0, $ line "; $ dsql-> SetQuery ($ SQL); $ dsql-> Execute ();}

    You can add a query field to the channel, and add the query field to the corresponding lib class on the "type", "channelartlist", and other tabs. the length is quite good.

    // Process the style of the current column in the same level column. Call in currentstyle, include \ taglib \ channel. lib. php line 140 $ linkOkstr = str_replace ("~ Typename ~ ", $ Row ['typename'], $ linkOkstr); add
    $ LinkOkstr = str_replace ("~ Typenameeng ~ ", $ Row ['typenameeng'], $ linkOkstr.

    The above is the detailed description of the steps (figure) for implementing the navigation function of DedeCMS in both Chinese and English. For more information, see other related articles in the first PHP community!

    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.