Exemplo n.º 1
0
 public function render($parentId)
 {
     $contents = Content::where('contentTypeSlug', 'heading')->where('parentId', $parentId)->get();
     if ($contents->isEmpty()) {
         return false;
     }
     $contentString = $contents->first()->content;
     $prefix = '<div class="cms-content-wrapper" data-content-type="Heading" data-content-id="' . $contents->first()->id . '">';
     $postfix = '</div>';
     $contentString = $prefix . $contentString . $postfix;
     return $contentString;
 }
Exemplo n.º 2
0
 public function render($parentId)
 {
     $contents = Content::where('contentTypeSlug', 'textBlock')->where('parentId', $parentId)->get();
     if ($contents->isEmpty()) {
         return false;
     }
     $contentString = $contents->first()->content;
     if ($this->adminMode) {
         $prefix = '<div class="cms-content-wrapper" data-content-type="TextBlock" data-content-id="' . $contents->first()->id . '">';
     } else {
         $prefix = '<div class="cms-content-wrapper text-block">';
     }
     $postfix = '</div>';
     $contentString = $prefix . $contentString . $postfix;
     return $contentString;
 }