search
HomeCMS TutorialEmpire CMSHow to call the title attribute and intercept the title word count in the Empire CMS smart tag? (code example)

How to call the title attribute and intercept the title word count in the Empire CMS smart tag? (code example)

Related recommendations: "Empire cms tutorial"

When Empire cms uses smart tags, we generally use =$bqr[title ]?>Output the title, as shown below:

[e:loop={"select title,titleurl from xjb_ecms_dzkb where `classid` = '$GLOBALS[navclassid]' order by newstime",1,24,0}]
  • ">=$bqr[title]?>
  • [/e:loop]

    1. How to intercept the number of words in the title with the Empire cms smart tag:

    Change the above =$bqr[title]?> is replaced with =esub($bqr[title],30)?>, where 30 represents the number of bytes, which is the display 15 Chinese characters

    II, Empire cms Smart label display title attribute method:

    1, in the SQL statement, change the titlefont field as well To select: select titlefont,title,titleurl from......

    2, change the above =$bqr[title]?>Replace with =DoTitleFont($bqr[titlefont],$bqr[title])?>

    Third, the empire cms smart label needs to display the title again Attributes, and the method of intercepting the number of words in the title:

    Combine the first and second methods, replace =$bqr[title]?> with =DoTitleFont($bqr[titlefont],esub($bqr[title],30))?>

    For more computer programming related knowledge, please visit: Programming video! !

    The above is the detailed content of How to call the title attribute and intercept the title word count in the Empire CMS smart tag? (code example). For more information, please follow other related articles on the PHP Chinese website!

    Statement
    This article is reproduced at:csdn. If there is any infringement, please contact admin@php.cn delete

    Hot AI Tools

    Undresser.AI Undress

    Undresser.AI Undress

    AI-powered app for creating realistic nude photos

    AI Clothes Remover

    AI Clothes Remover

    Online AI tool for removing clothes from photos.

    Undress AI Tool

    Undress AI Tool

    Undress images for free

    Clothoff.io

    Clothoff.io

    AI clothes remover

    Video Face Swap

    Video Face Swap

    Swap faces in any video effortlessly with our completely free AI face swap tool!

    Hot Tools

    MinGW - Minimalist GNU for Windows

    MinGW - Minimalist GNU for Windows

    This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

    mPDF

    mPDF

    mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

    Dreamweaver Mac version

    Dreamweaver Mac version

    Visual web development tools

    PhpStorm Mac version

    PhpStorm Mac version

    The latest (2018.2.1) professional PHP integrated development tool

    MantisBT

    MantisBT

    Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.