Making an alphabet map for dream Dedecms

Source: Internet
Author: User

Intermediary transaction http://www.aliyun.com/zixun/aggregation/6858.html ">seo diagnose Taobao guest cloud host technology Hall

In the use of Dream building site, some sites in the user experience or optimization needs an "alphabet map" such as: eight-degree box Game Network has many games, in order to facilitate users to find games, then need an alphabet map to navigate for users. So how do you make an alphabet map?

Below cut to the point, the site alphabet map production:

The first step is to open the http://www.badubox.com/dede/templets/cotalog_add.html (default path, if you have made changes, please follow the modified path to find the file.)

In the column name:

Add the following code (note: Use Dreamweaver or other HTML editing tools to modify, do not use the background File Manager to modify)

Alphabetical index:

  

and find http://www.badubox.com/dede/templets/cotalog_edit.html.

Make the same changes as above.

Step two, modify dede/catalog_add.php and catalog_edit.php (note: Still need to use the professional editing tool to modify)

Modify Catalog_add.php,

Look for ' #@__arctype ' (Reid, in Reid, after adding FirstWord,

Find values (' ~reid~ ', in ' ~reid~ ', after adding ' ~firstword~ ',

  

Find again ' #@__arctype ' (Reid, in Reid, add FirstWord behind,

Find values again (' $reid ', add ' $follow ' in ' $reid ',

  

Then modify the catalog_edit.php

Find $upquery = "UPDATE ' #@__arctype ' SET"

Add ' firstword ' = ' $firstword ' below, note that the punctuation is not missing, note the format.

  

The third step is to modify the 6184.html > datasheet, add a new field to the Dede_arctype table, add the field FirstWord steps:

Open the database, find the table Dede_arctype, and at the bottom of the datasheet structure

  

Click Execute, add a new field, and the field properties are as follows:

  

If you are not using this method, you can also use database commands directly:

To execute an SQL statement to add a field method:

Open Background >>>> system >>>>sql command line tools >>> Execute single-line command

ALTER TABLE ' dede_arctype ' ADD ' FirstWord ' VARCHAR ' is not null DEFAULT ' null ';

Execution.

  

Step fourth, look at the new properties that appear in the column and enter the letters

  

After the addition is complete, the column will have a new attribute "FirstWord"

Then we do the site map need to call these columns

The front call command is as follows:

{dede:sql sql= ' select * from Dede_arctype where firstword= ' A '}

[field:typename/]

{/dede:sql}

However, there is a problem with this invocation, [field:typedir/] contains {cmspath} and the link is invalid

So we're going to call

{dede:sql sql= ' select * from Dede_arctype where firstword= ' A '}

[field:typename/]

{/dede:sql}

The above code is the call column first letter a column, if it is to call the first letter B column,

{dede:sql sql= ' select * from Dede_arctype where firstword= ' B '}

[field:typename/]

{/dede:sql}

And so on, then we made a website alphabet map navigation.

Design by http://www.badubox.com/

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.