示例#1
0
 def getChapters(self, component, **kwargs):
     return Data(items=('Chapter1', 'Chapter2', 'Chapter3'))
示例#2
0
 def forEachResult(self):
     return Data(text="<?php foreach($results as $result): ?>")
示例#3
0
 def resultTitle(self):
     return Data(text="<?php echo $result->title() ?>")
示例#4
0
 def articleUrl(self):
     return Data(url="<?php echo $article->url() ?>")
示例#5
0
 def excerptArticle(self, length):
     return Data(text="<?php echo excerpt($article->text(), %d) ?>" %
                 length)
示例#6
0
 def forEachArticle(self):
     return Data(loop="<?php foreach($articles as $article): ?>")
示例#7
0
 def ifPaginationHasPages(self):
     return Data(text="<?php if($articles->pagination()->hasPages()): ?>")
示例#8
0
 def getLogoUrl(self, component, **kwargs):
     return Data(
         url=
         'http://data.xierpa.com.s3.amazonaws.com/_images/xierpa_x_green.png'
     )
示例#9
0
 def ifArticlesHasNext(self):
     return Data(
         text="<?php if($articles->pagination()->hasNextPage()): ?>")
示例#10
0
 def getFooter(self, component, **kwargs):
     return Data(text='Footer ' * 20)
示例#11
0
 def getLogo(self, component, **kwargs):
     return Data(text='Logo ' * 4)
示例#12
0
 def getArticle(self, component, **kwargs):
     return Data(text='Article ' * 300)
示例#13
0
 def getArticles(self, component, **kwargs):
     return Data(items=('Article1', 'Article2', 'Article3'))
示例#14
0
 def getFeaturedArticles(self, component, **kwargs):
     return Data(items=('Featured article1', 'Featured article2',
                        'Featured article3'))
示例#15
0
 def htmlTag(self):
     return Data(text="<?php echo html($tag) ?>")
示例#16
0
 def articlesNextUrl(self):
     return Data(url="<?= $articles->pagination()->nextPageURL() ?>")
示例#17
0
 def articleTagUrl(self):
     return Data(url="<?php echo url('articles/tag:' . urlencode($tag)) ?>")
示例#18
0
 def articlePublished(self):
     return Data(text="<?php echo html($article->published()) ?>")
示例#19
0
 def _forEach(self):
     return Data(text="<?php endforeach ?>")
示例#20
0
 def kirbyText(self):
     return Data(text="<?php echo kirbytext($page->text()) ?>")
示例#21
0
 def _if(self):
     return Data(text="<?php endif ?>")
示例#22
0
 def logoUrl(self):
     return Data(url="<?php echo url('assets/images/logo_petr.png') ?>")
示例#23
0
 def articleTitle(self):
     return Data(text="<?php echo html($article->title()) ?>")
示例#24
0
 def tagsLabel(self):
     return Data(text="Tags: ")
示例#25
0
 def ifResults(self):
     return Data(text="<?php if($results): ?>")
示例#26
0
 def forEachPageTag(self):
     return Data(
         text="<?php foreach(str::split($page->tags()) as $tag): ?>")
示例#27
0
 def resultUrl(self):
     return Data(url="<?php echo $result->url() ?>")
示例#28
0
 def pageTags(self):
     return Data(
         loop="<?php echo url('articles/tag:' . urlencode($tag)) ?>")
示例#29
0
 def resultDescription(self):
     return Data(text="<?php echo $result->description() ?>")
示例#30
0
 def getTagCloud(self, component, **kwargs):
     return Data(text='Tag Cloud ' * kwargs.get('count', 10))