Jump to content

DarkwaveSurfer

Members
  • Posts

    8
  • Joined

  • Last visited

Everything posted by DarkwaveSurfer

  1. Hi, I'm total newbie for php and Processwire so be patient with me I'm trying to make a simple blog. BLOG - list of all posts (template: blog-list) -- Post no.1 (template: blog-entry) -- Post no.2 (template: blog-entry) -- Post no.3 (template: blog-entry) CATEGORIES (template: categories) -- Jobs (template: category) -- Technology (template: category) Template for post "blog-entry" has Page field set to Multiple pages and input as Checkboxes. So it is posible to select CATEGORIES children pages via checkbox when editing blog post. This is how I show selected categories within blog-entry template for current blog post: foreach ($page->categories as $category) { echo "<a href='{$category->url}'>{$category->title}</a>"; } How do I show selected categories within blog-list template? I need list of all posts with their Title, body and selected categories from Page field checkbox. I managed to show title and body but not categories. This is my code so far: <?php echo "<h1>" . $page->get('headline|title') . "</h1>"; $entries = $pages->find('template=blog-entry')->sort('-created'); foreach($entries as $entry) { echo "<a href='{$entry->url}'>"; echo $entry->categories->title; //not working echo "<h2>{$entry->title}</h2>"; echo $entry->body; echo "</a>"; }; ?> Also how do I show on Jobs page (template: category) list of all posts that have jobs category selected? Thanks.
  2. @kongondo Thanks for the reply. I'm new with php and Processwire so I need a little help. I managed to show featured image from "images field" in recent posts widget like this (on my Home page): $blog = $modules->get("MarkupBlog"); $options = array('width'=>350, 'alt'=>'title', 'post_small_image' => 1, 'post_large_image' => 1, 'post_comments' => 0); $content = $blog->renderPosts("limit=2", true, $options); echo $content; But image from "images field" doesn't appear when I enter Blog post or in Blog page (list of all posts). How do I show image on those pages? Also, can the featured image be placed after the post title? At the moment it is before title. Thanks.
  3. Hi, I really like this module. I was wondering if it is possible to add featured image field to blog posts? I'm sure it is possible but don't know in which template file should I add new image field so it is available in all posts as featured image right after title of post. Thanks.
  4. My bad. Module is "Blog (ProcessBlog & MarkupBlog)". http://modules.processwire.com/modules/process-blog/
  5. Hi, I really like this module. I was wondering if it is possible to add featured image field to blog posts? I'm sure it is possible but don't know in which template file should I add new image field so it is available in all posts as featured image right after title of post. Thanks.
×
×
  • Create New...