Forum

Thread tagged as: Question, Blog

Blog css, uni-col and multi-col

What causes the class uni-col and multi-col to be added to the available sets / categories on the edit blog page?

Jon H

Jon H 0 points

  • 6 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

All the markup is in the templates. Copy the defaults to your main perch/templates folder and edit as you need.

Jon H

Jon H 0 points

Hi Drew, yes I've done that and added <perch:categories> to post.html. The classes uni-col and multi-col are added by Perch. I can't see why one category would have the class multi-col added and another has uni-col added? There's no difference in how I'm adding to post.html?

Drew McLellan

Drew McLellan 2638 points
Perch Support

Those only ever exist in the Perch control panel. Not on your site.

Jon H

Jon H 0 points

Yes I know but it's messing up the control panel (see screenshot). Is there a setting somewhere?

Screengrab

Drew McLellan

Drew McLellan 2638 points
Perch Support

Ok, so you mean to report an alignment bug? I'll make a note and see if we can get it fixed.

Jon H

Jon H 0 points

Not sure if it's a bug. Inspecting the html shows that a different class is added to the markup. uni-col to the article type and multi-col to the others?

Drew McLellan

Drew McLellan 2638 points
Perch Support

I can't see a circumstance whereby what you're seeing that screenshot would ever not be a bug.

Drew McLellan

Drew McLellan 2638 points
Perch Support

I can't reproduce this anywhere. Can you show me your template?

Jon H

Jon H 0 points

No template used. This is part of the Perch control panel?

Rachel Andrew

Rachel Andrew 394 points
Perch Support

Your template dictates what shows up in the Perch Control Panel. We can't reproduce this with our template so we would like to try with yours. The post.html that is your blog master template.

Jon H

Jon H 0 points

Here's my post.html file...

<article class="h-entry">
    <h1>
        <a href="<perch:blog id="postURL" type="hidden" />" rel="bookmark" class="p-name">
            <perch:blog id="postTitle" type="text" label="Title" required="true" size="xl autowidth" order="1" />
        </a>
    </h1>
    <p class="meta">
        <time class="dt-published" datetime="<perch:blog id="postDateTime" type="date" label="Date" time="true" format="Y-m-d H:i:s" divider-before="Meta information" />">
            <perch:blog id="postDateTime" type="date" time="true" format="%d %B %Y" /> 
        </time>
        <perch:if exists="authorGivenName">
            by <span class="p-author h-card"><perch:blog id="authorGivenName" type="hidden" /> <!-- <perch:blog id="authorFamilyName" type="hidden" /> --></span>
        </perch:if>    
        <perch:categories id="Brands" set="brands" label="Brands" display-as="checkboxes">
            <a href="archive.php?cat=brands/<perch:category id="catSlug" type="slug" />" class="p-category">
                <perch:category id="catTitle" type="text" />
            </a>
        </perch:categories>
        <perch:categories id="Building-type" set="building-type" label="Building type" display-as="checkboxes">
            <a href="archive.php?cat=building-type/<perch:category id="catSlug" type="slug" />" class="p-category">
                <perch:category id="catTitle" type="text" />
            </a>
        </perch:categories>
        <perch:categories id="Pipework-application" set="pipework-application" label="Pipework application" display-as="checkboxes">
            <a href="archive.php?cat=pipework-application/<perch:category id="catSlug" type="slug" />" class="p-category">
                <perch:category id="catTitle" type="text" />
            </a>
        </perch:categories>
        <perch:categories id="Article-type" set="article-type" label="Article type" display-as="checkboxes">
            <a href="archive.php?cat=article-type/<perch:category id="catSlug" type="slug" />" class="p-category">
                <perch:category id="catTitle" type="text" />
            </a>
        </perch:categories>
    </p>
    <perch:if exists="image">
        <div class="margin-20">
            <img src="<perch:blog id="image" type="image" label="Image" order="4" />" alt="<perch:blog id="postTitle" />" />
        </div>
    </perch:if>
    <div class="description entrey-content hidden">
        <perch:blog id="excerpt" type="textarea" label="Excerpt" markdown="true" order="3" size="s" />
    </div>
    <div class="description e-content">
        <perch:blog id="postDescHTML" type="textarea" label="Post" order="2" editor="markitup" markdown="true" size="xxl autowidth" required="true" />
    </div>
</article>

<perch:blog id="image" type="image" suppress="true" />
Drew McLellan

Drew McLellan 2638 points
Perch Support

Thanks, we'll see if that helps reproduce it.