Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • kubii Friend
    #182456

    Hi Folks,

    Do you know how to show the “ItemListCategory” that appears in the “ItemListCategoryBlock” not only in category view, but in Article view aswell?

    I would like the user to see the category details in the top, when he clicked on an article…

    Hope to hear from you soon!

    Saguaros Moderator
    #473896

    HI kubii,

    Do you mean that you want to show list of categories like this in K2 item page?

    kubii Friend
    #475262

    Hello Saguaros,
    thank you for your answer. In the meanwhile I tried to fix it myself, without any succes.

    I would like to have the same square box, that is filled with the k2 category description (example) in the article view aswell.
    In the article view (example) the box already exists, but is filled with “print&email”.
    I would like to see the k2 description of the Article, and the Article name in this grey box.

    Hope to hear from you soon!

    Saguaros Moderator
    #475652

    Hi kubii,

    I’m very sorry for this late response, somehow I missed.

    For this issue, could you make some screenshots of what you wanna achieve? since I cannot access 2 above sample links.

    kubii Friend
    #476005

    Hi Saguaros

    thanks for the reply! Sorry I deleted the category, as I was testing…
    Sure, there you go:
    Category View ( Here is the URL )

    Article View ( here is the URL )


    1. category
    2. article
    Saguaros Moderator
    #476074

    Hi kubii,

    I got your idea, however this needs some customization / hack in code in this K2 component. My temporary idea is that you should open code file which defines template view for K2 category:
    /components/k2/templates/default/category.php

    Find code to display category info:
    [PHP]
    <?php if(isset($this->category) || ( $this->params->get(‘subCategories’) && isset($this->subCategories) && count($this->subCategories) )): ?>
    <!– Blocks for current category and subcategories –>
    <div class=”itemListCategoriesBlock”>

    <?php if(isset($this->category) && ( $this->params->get(‘catImage’) || $this->params->get(‘catTitle’) || $this->params->get(‘catDescription’) || $this->category->event->K2CategoryDisplay )): ?>
    <!– Category block –>
    <div class=”itemListCategory”>
    <?php if(isset($this->addLink)): ?>
    <!– Item add link –>
    <span class=”catItemAddLink”>
    <a class=”modal” rel=”{handler:’iframe’,size:{x:990,y:650}}” href=”<?php echo $this->addLink; ?>”>
    <?php echo JText::_(‘K2_ADD_A_NEW_ITEM_IN_THIS_CATEGORY’); ?>
    </a>
    ……………….
    </div>
    <?php endif; ?>
    [/PHP]

    and copy to file defining template view for K2 item: /components/k2/templates/default/item.php

    It’s just my suggestion, please post your queries to K2 forum, they may give you better solution.

    Best of luck.

    kubii Friend
    #476528

    Thank you saguaros, after editing the code, I could not see any changes whatsoever 🙁
    (Besides a 500 server error, which was caused by a faulty line of code)

    I posted a question in the k2 forum… I’ll keep you guys posted.

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

This topic contains 7 replies, has 2 voices, and was last updated by  kubii 11 years, 11 months ago.

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