$current_post = $this->Blog_model->subrecord($page['id']); $sibling_posts = $this->Blog_model->child($current_post->parent); $prev_post = null; $next_post = null; foreach ($sibling_posts as $index => $sibling) { if ($sibling->id == $page['id']) { if ($index > 0) { $prev_post = $sibling_posts[$index - 1]; } if ($index < count($sibling_posts) - 1) { $next_post = $sibling_posts[$index + 1]; } break; } } $categories = $this->Blog_model->all_category_records('category'); $popular_posts = $this->Blog_model->get_blog_list(3, 0); $all_blog_posts = $this->Blog_model->get_blog_list(50, 0); $all_tags = array(); foreach ($all_blog_posts as $post) { if (!empty($post->keywords)) { $post_tags = array_map('trim', explode(',', $post->keywords)); foreach ($post_tags as $tag) { $tag = trim($tag); if (!empty($tag)) { $all_tags[] = strtolower($tag); } } } } $tag_counts = array_count_values($all_tags); arsort($tag_counts); $unique_tags = array_keys(array_slice($tag_counts, 0, 10)); $category_counts = array(); foreach ($categories as $category) { $category_counts[$category->id] = $this->Blog_model->subCount($category->id); } ?>

How to Choose Between Thermally Broken and Standard Aluminium Systems