Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • Aratype Friend
    #189589

    Is it possible to show “Category” in the place of “Comments” in “Featured Articles” only?

    As you can imagine, comments will be shown in new articles after some days…

    However, showing “Category” will give the reader an idea about the diversity of the content.

    Thanking you in advance…

    Ara

    Saguaros Moderator
    #501911

    Hi Ara,

    You can go to backend settings of this menu item: Featured Articles > Articles Options > Show Category & Link Category and set to ‘Show’ > Save & refresh your site and let me know how it goes 🙂

    Aratype Friend
    #501986

    Thanks Saguaros,

    Almost done ! The category is in the same line as the “Create Date”. Is it possible to have it in the same place as comments?

    It will be a great add to the template to have the homogeneous visual aspect.

    Thanking you in advance.

    My site: makanez.net

    Ara

    Saguaros Moderator
    #502328

    Hi Ara,

    Try opening file: templatesja_smashboardhtmlcom_contentfeatureddefault_item.php and move this snippet of code

    [PHP]
    <?php if ($params->get(‘show_category’)) : ?>
    <dd class=”category-name”>
    <?php $title = $this->escape($this->item->category_title);
    $url = ‘<a href=”‘.JRoute::_(ContentHelperRoute::getCategoryRoute($this->item->catslug)).'”>’.$title.'</a>’;?>
    <?php if ($params->get(‘link_category’) AND $this->item->catslug) : ?>
    <?php echo JText::sprintf(‘SMART_COM_CONTENT_CATEGORY’, ‘<span>’.$url.'</span>’); ?>
    <?php else : ?>
    <?php echo JText::sprintf(‘SMART_COM_CONTENT_CATEGORY’, ‘<span>’.$title.'</span>’); ?>
    <?php endif; ?>
    </dd>
    <?php endif; ?>
    [/PHP]

    to underneath the code of comment view

    [PHP]
    <?php if($this->item->event->afterDisplayTitle && stripos($this->item->event->afterDisplayTitle, ‘count’) !== false): ?>
    <dd style=”float: none;”> </dd>
    <dd class=”comment-view”>
    <?php echo $this->item->event->afterDisplayTitle; ?>
    </dd>
    <?php endif; ?>
    [/PHP]

    Aratype Friend
    #502426

    Thank you Saguaros,

    I tried it but it does not work as you can see in: http://www.makanez.net

    Saguaros Moderator
    #502450

    Hi again,

    Try opening file: /templates/ja_smashboard/css/rtl/template.css, around line 2268


    .article-info dd {
    float: right;
    margin-left: 22px; <<<< change to this value
    margin-right: 0;
    white-space: nowrap;
    }

    Hope it helps.

    Aratype Friend
    #502462

    OK, thanks, got it…

    However, I had to modify the value…, I do not know if to be valid for all screens and Win/Mac

    [PHP].article-info dd {
    float: right;
    margin-left: 30px; <<<< change to this value
    margin-right: 0;
    white-space: nowrap;
    }[/PHP]

    Saguaros Moderator
    #502531

    You can make a test with these devices, if it doesn’t work well, try using media jQuery to add specific css rule for them

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

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

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