Forum

Thread tagged as: Question, Problem, Blog

blog categories

hi,

in my blog, i did set 2 categories, but they are not shown on the html page, using this tag:

<?php perch_blog_categories(); ?>

what would i have to do ?

thanks and best regards, katja

Katja Schwarz

Katja Schwarz 0 points

  • 7 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Are the categories used by any posts?

no, as they have not been in the html template, i try this !

i put this in post.html

<perch:categories id="categories" set="Blog" label="Categories" display-as="checkboxes">
            <a href="archive.php?cat=<perch:category id="catSlug" type="slug" />" class="p-category">
                <perch:category id="catTitle" type="text" />
            </a>
        </perch:categories>

the label appears, but no checkbox

Drew McLellan

Drew McLellan 2638 points
Perch Support

Change

set="Blog"

to

set="blog"

i tried both, but it still does not work

that's the output in the html file

<div class="field "> <label class="" for="perch_categories">Categories</label> <fieldset> <div class="wrapped checkboxes fieldtype uni-col"> <strong></strong> </div> </fieldset> </div>

Drew McLellan

Drew McLellan 2638 points
Perch Support

Which versions of Perch and Blog are you using?

Perch: 2.7.2, PHP: 5.4.35, MySQL: mysqlnd 5.0.10 - 20111026 - $Id: c85105d7c6f7d70d609bb4c000257868a40840ab $, with PDO Server OS: Linux, cgi-fcgi Installed apps: content (2.7.2), assets (2.7.2), categories (2.7.2), perch_blog (4.5.4) App runtimes: <?php $apps_list = array( 'content', 'categories', 'perch_blog', );

Drew McLellan

Drew McLellan 2638 points
Perch Support

Do you have a category set called "Blog"?

when I log in, I have "Apps", and in the drop down menu there are two points: Categories and Blog+

under Categories, there are two sets called Blog (slug: blog) and test (i added this)

i have not changed the set options for Blog

Drew McLellan

Drew McLellan 2638 points
Perch Support

Ok, great. Are you categories in that Blog set?

no, not so far, but now i added a category and it works fine now, the checkbox is there and the category is shown on the page ... for some reason i just did not see the "+ add category" button until now

thanks a lot, you're great !

i have a new question, can i post it here or shall i open a new topic ?

Drew McLellan

Drew McLellan 2638 points
Perch Support

Post a new topic!