类 GetContentPageMethod

java.lang.Object
com.publiccms.common.base.BaseMethod
com.publiccms.views.method.cms.GetContentPageMethod
所有已实现的接口:
freemarker.template.TemplateMethodModel, freemarker.template.TemplateMethodModelEx, freemarker.template.TemplateModel

@Component public class GetContentPageMethod extends BaseMethod
getContentPage 获取正文分页结果

参数列表

parameter list

パラメータリスト

  1. 正文
  2. 页码

返回结果

return result

戻り値

使用示例

usage example

使用例

<#assign textPage=getContentPage(attribute.text,2)/<

${textPage.text?no_esc!} current page :${textPage.page.pageIndex}

<script>
$.getJSON('${site.dynamicPath}api/method/getContentAttributes?parameters=正文内容&parameters=2', function(data){
console.log(data.text);
});
</script>
 
  • 构造器详细资料

    • GetContentPageMethod

      public GetContentPageMethod()
  • 方法详细资料

    • execute

      public Object execute(List<freemarker.template.TemplateModel> arguments) throws freemarker.template.TemplateModelException
      指定者:
      execute 在类中 BaseMethod
      抛出:
      freemarker.template.TemplateModelException
    • minParametersNumber

      public int minParametersNumber()
      指定者:
      minParametersNumber 在类中 BaseMethod
      返回:
      min parameters number
    • needAppToken

      public boolean needAppToken()
      指定者:
      needAppToken 在类中 BaseMethod
      返回:
      whether to need app token