Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • christofferl Friend
    #883828

    See attached image.

    I need help in trying to add to the JA K2 Filter template so that the K2 category is in vertical alignment to the Extra Fields items. As it is now it is too much to the left.


    1. joomlart_categroy_algin1
    Luna Garden Moderator
    #883983

    Hi,

    JA K2 Filter uses K2 Template to display the Result page, so in order to change the style of Category, go to file K2 template of your site and add class for Category code as Extra Fields items.
    For example: in file

    componentscom_k2templatesdefaultcategory_item.php

    has code to display category name

    <div class="catItemCategory">
                <span><?php echo JText::_('K2_PUBLISHED_IN'); ?></span>
                <a href="<?php echo $this->item->category->link; ?>"><?php echo $this->item->category->name; ?></a>
            </div>

    then I will change the class name to similar as K2 Extra field items.

    <div class=catItemExtraFields">
                <span class="catItemExtraFieldsLabel"><?php echo JText::_('K2_PUBLISHED_IN'); ?></span>
                <span class="catItemExtraFieldsValue"><a href="<?php echo $this->item->category->link; ?>"><?php echo $this->item->category->name; ?></a></span>
            </div>

    based on the code of your site, you can custom the category code to style you want.

    christofferl Friend
    #884174

    I am a super user … not a coder … so I will try to see if I can understand this. But before I do, please confirm that this is "future proof" when it comes to upgrading the K2 component it self.

    Would it be possible to as an alternative way, use the custom.css approach instead?

    Luna Garden Moderator
    #884890

    Would it be possible to as an alternative way, use the custom.css approach instead?

    I have checked your site, you can add these lines to your CSS file:

    .catItemCategory span {
        display: block;
        float: left;
        font-weight: bold;
        margin: 0 4px 0 0;
        width: 30%;
        color: #0a0a0a!important;
    }

Viewing 4 posts - 1 through 4 (of 4 total)

This topic contains 3 replies, has 2 voices, and was last updated by  Luna Garden 8 years, 8 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum