Ecshop ad call method summary

Source: Internet
Author: User

I briefly summarized the ecshop advertisement calling method, which was previously published on my blog. Here I will summarize it with you.

Method 1: The official default method. Add the ad space first, then add the ad space area of the template, and then match the two.
1. Click "add ad space" in "Advertisement Management" in the background.

Add ad location:


2. Add advertisement content

Then go to the "ad list" and click the "add ad" button. Note that you need to select the ad space added in step 1 from the ad location drop-down list.

Note: Make sure to select the name you just added for the ad location: the ad on the homepage bar (960 × 60); otherwise, it cannot be displayed.

 

3. Modify the homepage Template

Open the index. DWT file and add:

        <!-- TemplateBeginEditable name="a1" -->            <!-- TemplateEndEditable -->   

Note that the A1 name cannot contain special characters, so I have included an asterisk before. It takes a long time to find the cause. Remember

4. Modify background template management and select homepage template.
Find the "ad space" at the bottom and click "+" to expand,

In the first drop-down box, select "ad space (width: 960 × 100) in the homepage header bar )"
In the second drop-down box, select "ad space in the homepage header bar [960 × 100]"

Click OK to save the changes.

 

Method 2:
Step 1: First add an advertisement location from the background, and then select this advertisement location to add an image.
Step 2. If you need to adjust the advertisement, add the following code to the PHP file to obtain the advertisement to be displayed.


// The first advertising space in the center $ ads = array ('num' => '1 ', // number of advertisements 'id' => '1' // ID of the advertisement location ID. You can click the List of background advertisement locations and place the cursor on each item to see the corresponding content. ); $ Banner = insert_ads ($ ads); $ smarty-> assign ("banner", $ banner); // set the ad space content and call it in the template

Step 3: Open the template file. If there is only one advertisement, {$ banner} OK. If there are multiple templates, loop through the Array {$ banner} to display the advertisement content.

Welcome to repost. This article is provided by programmer life network, www.wfuyu.com

Ecshop ad call method summary

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.