Posts by janet

    I've created a 'Blogger' role but I don't want the blogger being able to edit the site's main pages; only the blog pages.

    In assigning the role, 'pages' privileges have all the tickboxs unchecked, including 'edit page details'. The only privileges given are to login, upload assets and Blog manipulation (create posts etc.)

    However, once assigned this role, the Blogger is still able to edit the site pages (though not delete pages etc).

    Perch: 3.1.5, perch_blog (5.6.1)

    Am I missing something?

    I have the latest install of perch (3.1.5) and blog (5.6.1).

    Making a change to a blog's meta/social data causes the post's category to be lost (even though admin thinks it's still there). I have to go back in to the main part of the post and resave to get the post's category to be recognised again. It's very difficult to keep track of which posts might be missing from a category or not.

    To reproduce:

    * Make a change to a blog post's meta/social data eg. change the author or allow comments.

    * Check that it's category is still ok on the main part of the post - and it is - the category checkbox is still ticked.

    * Go to the blog on the site, and click the category to see a list of the posts with that category. That particular post has gone - even though ADMIN still has the category assigned.

    * Go back into admin and Re-save the blog post

    * The post is now included in the list when you click the category.

    I did see a ticket on the old system over a year ago with this issue. Is there any news on a fix for this?

    Many thanks

    One further issue though, for the title in archive.php, I can achieve it with:

    1. echo '<h1>Case Studies : '. perch_category('industry-sector/'.perch_get('cat'), [], true) .'</h1>';

    However, I actually have three category sets so I can't hardcode the 'industry sector'. Ideally I would like to dynamically list:

    * set title : Category title.

    Is there another way I can achieve this with Perch?

    I’m trying to use the perch blog as a way of posting case studies as well as standard blog posts.

    I have two blog sections: Posts and Case Study.

    I also have two category sets. Blog and Industry Sector

    To use these, I have two post templates. One is the default blog post template which uses the standard blog categories. The other is case-study.html uses the Industry sector categories.

    At the moment, I can build posts either blog or case study, and I list these out on two separate pages, with a side bar showing their respective category links. When I list the category links, they are correct and the count is also correct. However, if I click the category link for my case studies, I’m getting no results listed (even though there are some and the count on the link is correct). I’m at a bit of a loss at what to try next. Any help appreciated!

    Here's the section of case_study.php


    1. <perch:before>
    2. <h3>Case Study Categories</h3>
    3. <ul>
    4. </perch:before>
    5. <li>
    6. <a href="/blog/case_study_archive.php?cat=<perch:category id="catSlug" />"><perch:category id="catTitle" /> (<perch:category id="" when-empty="0" />)</a>
    7. </li>
    8. <perch:after></ul></perch:after>


    In the above case_study_archive.php (which is simply a tweaked archive.php), the perch_get returns the category fine, but the perch_blog_category below is blank, and I don't even think post_in_list.html is being called as I cannot get anything returned from perch:showall.

    1. echo '<h1>Case Studies in category : '.perch_blog_category(perch_get('cat'), true).'</h1>';

    Sorry - that should have read

    <?php perch_blog_categories(array(

    'section' => 'case-study',

    )); ?>

    The categories are correct for the section are correct, but the count includes all the blogs - not just the ones within the section. And additionally, on clicking the category link, it lists all the blog posts, not just the ones within the section for that category.

    Is this possible with Perch?

    I have a blog with two sections: 'posts' and 'case-study'.

    The categories for each section are the same.

    I can list out posts from the different sections with:



    'section' => 'case-study',

    'sort' => 'postDateTime',

    'sort-order' => 'DESC',

    'template' => 'blog/post_in_list.html'



    I'd like to also output the list of blog categories set up for the blog on a per section basis. I though that this would work, but I only get the list of categories containing a mixture of all the blogs (not per section).

    <?php perch_blog_categories(['section' => 'case-study']); ?>

    <?php perch_blog_categories(['section' => 'posts']); ?>

    Is it possible to list the categories on a per section basis, or am I doing something wrong?

    Many thanks

    Hi Hussein. Yes - I was going to do it by passing the category into perch_blog_custom() so I could take advantage of the sort, count etc, but I couldn't work out how to pass in the category that I've obtained from the content region. But yes - filtering the blog by a category is essentially what I'm wanting to do.

    I need to add the most recent 5 blog post titles on dynamically created perch pages using a category that is chosen in perch admin.

    In the master page, I can choose the Blog Category for the page using the following html template which allows me to chose which category I want from a drop down. Here I can get the category link.

    <perch:before><ul></perch:before> <li> <perch:categories id="category" set="blog" label="Category"> <a href="blog/archive.php?cat=<perch:category id="catSlug" type="slug" />"> <perch:category id="catTitle" /> </a> </perch:categories> </li> <perch:after></ul></perch:after>

    But what I really want is a list of blog titles based on that category ie. use perch_blog_custom(). How do I pass the category I have chosen via perch admin, into perch_blog_custom?






    'category' => ??????