本文整理汇总了PHP中Block::set_content方法的典型用法代码示例。如果您正苦于以下问题:PHP Block::set_content方法的具体用法?PHP Block::set_content怎么用?PHP Block::set_content使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Block
的用法示例。
在下文中一共展示了Block::set_content方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: smarty_function_create_block
function smarty_function_create_block($params, &$smarty)
{
global $smarty_blocks;
$block = new Block($params['name']);
$block->set_content($params['content']);
$block->output(false);
$smarty_blocks[$params['name']] = $block;
if (isset($params['parent'])) {
$smarty_blocks[$params['parent']]->add_block($block);
}
return "";
//return "qweqwe";
}
示例2: Block
<?php
$block4 = new Block('be-theme-pro-footer-col-4');
?>
<?php
$block4->set_global(true);
?>
<?php
$block4->set_size('span12');
?>
<?php
$block4->html('{content}');
?>
<?php
$block4->set_content('<hr />
<p class="copy">
<!-- Copyright Bar -->
Copyright © <a href="/index.php">Your Site</a> | Powered by <a href="http://www.builderengine.com">BuilderEngine</a> | <a href="/admin">Edit this website</a>
</p>
');
?>
<?php
$footer->add_block($block1);
?>
<?php
$footer->add_block($block2);
?>
<?php
$footer->add_block($block3);
?>
示例3:
<?php
$line3->add_css_class('row');
?>
<?php
$line3->add_css_class('cta');
?>
<?php
$line3->set_resizable(false);
?>
<?php
$line3->set_content('
<div class="span9">
<!-- First line -->
<p class="cbig">BuilderEngine - The HTML5 Website Builder & CMS Platform</p>
<!-- Second line -->
<p class="csmall">Design professional looking websites with our complete GUI controlled Design Builder that will revolutionize theme creation & updating with HTML5 / CSS3.</p>
</div>
<div class="span2">
<!-- Button -->
<div class="button"><a href="http://www.builderengine.com">Free Account</a></div>
</div>
');
?>
<?php
$holder->add_block($line1);
?>
<?php
$holder->add_block($line2);
?>
<?php
$holder->add_block($line3);
示例4: Block
?>
<?php
$line3->add_block($block1);
?>
<?php
$block2 = new Block('be-theme-pro-home-line-3-col-2');
?>
<?php
$block2->set_size('span6');
?>
<?php
$block2->html("{content}");
?>
<?php
$block2->set_content('
<img src="' . get_theme_path() . 'img/beland1.jpg" alt="" />
');
?>
<?php
$line3->add_block($block2);
?>
<!-- 4th Line of Blocks -->
<?php
$line4 = new Block("rpost-test");
?>
<?php
$line4->set_type('pro_rpost');
?>
<?php
示例5: Block
<!-- Header starts -->
<header>
<div class="container">
<div class="row">
<?php
$block1 = new Block('be-theme-pro-header-sitename');
?>
<?php
$block1->set_global(true);
?>
<?php
$block1->html('<div class="logo">{content}</div>');
?>
<?php
$block1->set_content('<h1><a href="/">Default Theme</a></h1>');
?>
<?php
$block1->set_size('span5');
?>
<?php
$block1->show();
?>
<?php
$block2 = new Block('be-theme-pro-header-social');
?>
<?php
$block2->set_global(true);
?>
示例6: Block
$holder->html('{elements}');
?>
<?php
$holder->add_css_class('row');
?>
<?php
$block = new Block("business-commodore-1-theme-blank-block-" . $page->id);
?>
<?php
$block->set_size('span12');
?>
<?php
$block->set_content('
<h1>Blank Page</h1>
<p>Edit this block or add an new block.</p>
');
?>
<?php
$holder->add_block($block);
?>
<?php
$holder->show();
?>
</div>
</div>
</div>
</div>
示例7: Block
<?php
$line1 = new Block("business-commodore-1-theme-portfolio-line1");
?>
<?php
$line1->html("{content}");
?>
<?php
$line1->set_resizable(false);
?>
<?php
$line1->set_content('
<!-- Portfolio hero -->
<div class="hero">
<!-- Title -->
<h3><span>Portfolio</span></h3>
<!-- para -->
<p>Praesent at tellus porttitor nisl porttitor sagittis. Mauris in massa ligula, a tempor nulla. Ut tempus interdum mauris vel vehicula. Nulla ullamcorper tortor commodo in sagittis est accumsan.</p>
</div>
<!-- Portfolio -->
');
?>
<?php
$line1->show();
?>
<p>
<!-- Add filter names inside "data-filter". For example ".web-design", ".seo", etc., Filter names are used to filter the below images. -->
<div class="button">
<ul id="filters">
<li><a href="#" data-filter="*" >All</a></li>
<li><a href="#" data-filter=".one" >One</a></li>
<li><a href="#" data-filter=".two" >Two</a></li>