1. 论坛系统升级为Xenforo,欢迎大家测试!
    排除公告

Textpattern的模板标签真强大啊

本帖由 laogui2007-04-02 发布。版面名称:源码讨论

  1. laogui

    laogui Administrator
    管理成员

    注册:
    2005-08-30
    帖子:
    15,216
    赞:
    35
    今天才开始研究它的模板,非常灵活,不过对于新手来说要了解这么多标签要花一点时间,每个标签里还有不同的属性

    代码:
     A - B
    
        * <txp:article />
        * <txp:article_custom />
        * <txp:article_id />
        * <txp:article_image />
        * <txp:author />
        * <txp:body />
        * <txp:breadcrumb /> 
    
    
    C
    
        * <txp:category />
        * <txp:category_list />
        * <txp:category1 />
        * <txp:category2 />
        * <txp:comment_anchor />
        * <txp:comment_email />
        * <txp:comment_email_input />
        * <txp:comment_id />
        * <txp:comment_message />
        * <txp:comment_message_input />
        * <txp:comment_name />
        * <txp:comment_name_input />
        * <txp:comment_permlink >###</txp:comment_permlink>
        * <txp:comment_preview />
        * <txp:comment_remember />
        * <txp:comment_submit />
        * <txp:comment_time />
        * <txp:comment_web />
        * <txp:comment_web_input />
        * <txp:comments />
        * <txp:comments_count />
        * <txp:comments_error />
        * <txp:comments_form />
        * <txp:comments_help />
        * <txp:comments_invite />
        * <txp:comments_preview />
        * <txp:custom_field />
        * <txp:css /> 
    
    
    D - F
    
        * <txp:else />
        * <txp:email />
        * <txp:error_message />
        * <txp:error_status />
        * <txp:excerpt />
        * <txp:feed_link />
        * <txp:file_download />
        * <txp:file_download_category />
        * <txp:file_download_created />
        * <txp:file_download_description />
        * <txp:file_download_downloads />
        * <txp:file_download_id />
        * <txp:file_download_link >###</txp:file_download_link>
        * <txp:file_download_list />
        * <txp:file_download_modified />
        * <txp:file_download_name />
        * <txp:file_download_size /> 
    
    
    I
    
        * <txp:if_article_author>###</txp:if_article_author>
        * <txp:if_article_category>###</txp:if_article_category>
        * <txp:if_article_id>###</txp:if_article_id>
        * <txp:if_article_list>###</txp:if_article_list>
        * <txp:if_article_section>###</txp:if_article_section>
        * <txp:if_author>###</txp:if_author>
        * <txp:if_category>###</txp:if_category>
        * <txp:if_comments >###</txp:if_comments>
        * <txp:if_comments_allowed>###</txp:if_comments_allowed>
        * <txp:if_comments_disallowed>###</txp:if_comments_disallowed>
        * <txp:if_comments_error>###</txp:if_comments_error>
        * <txp:if_comments_preview />
        * <txp:if_custom_field >###</txp:if_custom_field>
        * <txp:if_different>###</txp:if_different>
        * <txp:if_excerpt >###</txp:if_excerpt >
        * <txp:if_first_article>###</txp:if_first_article>
        * <txp:if_individual_article>###</txp:if_individual_article>
        * <txp:if_last_article>###</txp:if_last_article>
        * <txp:if_plugin>###</txp:if_plugin>
        * <txp:if_search>###</txp:if_search>
        * <txp:if_section>###</txp:if_section>
        * <txp:if_status>###</txp:if_status>
        * <txp:image />
        * <txp:image_display />
        * <txp:image_index /> 
    
    
    J - O
    
        * <txp:keywords />
        * <txp:lang />
        * <txp:link />
        * <txp:link_category />
        * <txp:link_date />
        * <txp:link_description />
        * <txp:link_feed_link />
        * <txp:link_to_home>###</txp:link_to_home>
        * <txp:link_to_next >###</txp:link_to_next >
        * <txp:link_to_prev >###</txp:link_to_prev >
        * <txp:linkdesctitle />
        * <txp:linklist />
        * <txp:link_name />
        * <txp:link_url />
        * <txp:meta_keywords />
        * <txp:meta_author />
        * <txp:newer >###</txp:newer >
        * <txp:next_title />
        * <txp:older >###</txp:older >
        * <txp:output_form /> 
    
    
    P - Z
    
        * <txp:page_title />
        * <txp:page_url />
        * <txp:password_protect />
        * <txp:permlink>
        * <txp:php>###</txp:php>
        * <txp:popup />
        * <txp:posted />
        * <txp:prev_title />
        * <txp:recent_articles />
        * <txp:recent_comments />
        * <txp:related_articles />
        * <txp:search_input />
        * <txp:search_result_count />
        * <txp:search_result_date />
        * <txp:search_result_excerpt />
        * <txp:search_result_title />
        * <txp:search_result_url />
        * <txp:section />
        * <txp:section_list />
        * <txp:sitename />
        * <txp:site_slogan />
        * <txp:site_url />
        * <txp:text />
        * <txp:thumbnail />
        * <txp:title />
        * <txp:txp_die /> 
     
  2. fen

    fen New Member

    注册:
    2005-12-18
    帖子:
    3,050
    赞:
    25
    你才知道啊~~~:mummy:
     
  3. qlq

    qlq Active Member

    注册:
    2006-04-20
    帖子:
    2,658
    赞:
    1
    可以说很垃圾