Exemplo n.º 1
0
      <?php 
$category = $material->category;
\Ui\Tree::ul($category->getRoot(), 0, function ($category) {
    echo "<a href='{$category->getHref()}'> {$category->name()}</a>";
});
?>
    </div>
    <div class="col-md-9">
      <div class="content">
        <h2 class="material-name"><?php 
echo $material->name;
?>
</h2>
        <div class="material-text">
          <?php 
echo Ui\FastEdit::block($material, 'text', null, true);
?>
        </div>
        <?php 
if ($material->links) {
    echo '<ul class = "material-links">';
    foreach ($material->links as $materialLink) {
        $href = $materialLink->linkedMaterial->alias;
        if ($href == '') {
            $href = '/';
        }
        $name = $materialLink->name ? $materialLink->name : $materialLink->linkedMaterial->name;
        echo "<li><a href = '{$href}'>{$name}</a></li>";
    }
    echo '</ul>';
}
Exemplo n.º 2
0
    <div class="col-md-3">
      <?php 
\Ui\Tree::ul($category->getRoot(), 0, function ($category) {
    echo "<a href='{$category->getHref()}'> {$category->name()}</a>";
});
?>
    </div>
    <div class="col-md-9">
      <div class="content">
        <h2 class ='category-name'><?php 
echo $category->name;
?>
</h2>
        <div class="material-description">
          <?php 
echo Ui\FastEdit::block($category, 'description', null, true);
?>
        </div>
        <div class ="category-materials">
          <div class ="row">
            <?php 
$i = 0;
foreach ($materials as $material) {
    ?>
                <div class = "col-sm-6 category-material">
                  <a class="category-material-name" href ="<?php 
    echo $material->getHref();
    ?>
"><h3><?php 
    echo $material->name;
    ?>