Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • hartling Friend
    #197707

    Hello

    All article titles have the same heading size.
    I would like to change the title size in Magazine Layout. (no css px)

    Exactly what i want is:
    Main Article Title to be H1
    Sub Articles Titles to be H2
    List Articles Titles to be H3

    Thank you in advance

    Saguaros Moderator
    #535030

    <blockquote>
    Main Article Title to be H1
    Sub Articles Titles to be H2
    List Articles Titles to be H3
    </blockquote>

    Could you send me screenshot highlighting these parts in our demo site? http://purity_iii.demo.joomlart.com/index.php/layout/new-layouts/magazine

    hartling Friend
    #535045

    Hi Saguaros,

    sorry that i confuse you.
    here is the image


    1. image
    Saguaros Moderator
    #535058

    These 3 sections: magazine featured leading, magazine featured intro and magazine featured links are rendering the same ‘blog_style_default_item_title’ so all of them have <h2> tag in title. You can try with my workaround below:

    – Duplicate this file: layoutsjoomlacontentblog_style_default_item_title.php to have another 2 files: blog_style_default_item_title.php1 and blog_style_default_item_title.php2

    – If you want the magazine featured leading article to have <h1> tag, open the file: layoutsjoomlacontentblog_style_default_item_title.php and look for this block of code:
    [PHP]
    <?php if ($params->get(‘show_title’)) : ?>
    <h2 itemprop=”name”>
    <?php if ($params->get(‘link_titles’) && $params->get(‘access-view’)) : ?>
    <a href=”<?php echo JRoute::_(ContentHelperRoute::getArticleRoute($displayData->slug, $displayData->catid)); ?>” itemprop=”url”>
    <?php echo $this->escape($displayData->title); ?></a>
    <?php else : ?>
    <?php echo $this->escape($displayData->title); ?>
    <?php endif; ?>
    </h2>
    <?php endif; ?>
    [/PHP]

    then simply change <h2> to <h1> tag.

    Do the same with 2 other files for intro and links article with <h2> and <h3> tag.

    – Open this file: templatespurity_iiihtmlcom_contentcategorymagazine_featured.php then find the block code of magazine featured intro and links. change like this:
    [PHP]
    <div class=”col-sm-12 magazine-intro magazine-featured-intro”>
    <?php $intro_index = 0; ?>
    <?php foreach ($intro as $item) : ?>
    <?php if($intro_index % $intro_columns == 0) : ?>
    <div class=”row”>
    <?php endif ?>
    <div class=”magazine-item col-sm-<?php echo round((12 / $intro_columns)) ?>”>
    <?php echo JLayoutHelper::render(‘joomla.content.intro_image’, $item); ?>
    <?php echo JLayoutHelper::render(‘joomla.content.blog_style_default_item_title1’, $item); ?>
    <?php if ($useDefList && in_array(‘intro’, $info_positions)) : ?> <aside class=”article-aside clearfix”>
    <?php echo JLayoutHelper::render(‘joomla.content.info_block.block’, array(‘item’ => $item, ‘params’ => $params, ‘position’ => ‘above’)); ?>
    </aside>
    <?php endif; ?>
    <?php echo $item->event->afterDisplayTitle; ?>
    <?php echo $item->event->beforeDisplayContent; ?>
    <?php echo $item->event->afterDisplayContent; ?>
    </div>
    <?php $intro_index++; ?>
    <?php if(($intro_index % $intro_columns == 0) || $intro_index == $intro_count) : ?>
    </div>
    <?php endif ?>
    <?php endforeach; ?>
    </div>
    [/PHP]

    [PHP]
    <div class=”magazine-links magazine-featured-links”>
    <?php foreach ($links as $item) :?>
    <div class=”magazine-item link-item”>
    <?php echo JLayoutHelper::render(‘joomla.content.blog_style_default_item_title2’, $item); ?>
    <?php if ($useDefList && in_array(‘link’, $info_positions)) : ?>
    <aside class=”article-aside clearfix”>
    <?php echo JLayoutHelper::render(‘joomla.content.info_block.block’, array(‘item’ => $item, ‘params’ => $params, ‘position’ => ‘above’)); ?>
    </aside>
    <?php endif; ?>
    </div>
    <?php endforeach; ?>
    </div>
    [/PHP]

    hartling Friend
    #535076

    Thank you, worked perfectly!

    Saguaros Moderator
    #535078

    Glad to be of assistance 🙂

    hartling Friend
    #535091

    Saguaros Thank you for your reply.

    I have one more question, and i would be greatful if you could help me again.

    I want the intro articles to have some body. I try to add the code from the “magazine-featured-leading” section but some thing is breaking the side bar positioning. Which code should i add at “magazine-featured-intro” section?

    Best Regards

    Saguaros Moderator
    #535253

    You should make change in file templatespurity_iiihtmlcom_contentcategorymagazine_featured.php, look for block code for magazine featured intro.

    Suppose that you want to add intro text below the article title, you will add like this:


    <div class="row">
    <?php if ($intro_count = count ($intro)): ?>
    <div class="col-sm-12 magazine-intro magazine-featured-intro">
    <?php $intro_index = 0; ?>
    <?php foreach ($intro as $item) : ?>
    <?php if($intro_index % $intro_columns == 0) : ?>
    <div class="row">
    <?php endif ?>
    <div class="magazine-item col-sm-<?php echo round((12 / $intro_columns)) ?>">
    <?php echo JLayoutHelper::render('joomla.content.intro_image', $item); ?>
    <?php echo JLayoutHelper::render('joomla.content.blog_style_default_item_title', $item); ?>
    <?php if ($useDefList && in_array('intro', $info_positions)) : ?>
    <aside class="article-aside clearfix">
    <?php echo JLayoutHelper::render('joomla.content.info_block.block', array('item' => $item, 'params' => $params, 'position' => 'above')); ?>
    </aside>
    <?php endif; ?>

    <?php echo $item->event->afterDisplayTitle; ?>
    <?php echo $item->event->beforeDisplayContent; ?>
    <div class="magazine-item-ct">
    <?php echo $item->introtext; ?>
    </div>
    <?php echo $item->event->afterDisplayContent; ?>
    </div>
    <?php $intro_index++; ?>
    <?php if(($intro_index % $intro_columns == 0) || $intro_index == $intro_count) : ?>
    </div>
    <?php endif ?>
    <?php endforeach; ?>
    </div>
    <?php endif ?>
    </div>

    hartling Friend
    #535278

    Hello saguaros

    I had added this code because i wanted the read more (at the section you mentioned before)


    <!----------------------------------------------->
    <div class="magazine-item-ct">
    <?php echo $item->introtext; ?>
    </div>
    <?php if ($params->get('show_readmore') && $item->readmore) :
    if ($item->params->get('access-view')) :
    $link = JRoute::_(ContentHelperRoute::getArticleRoute($item->slug, $item->catid));
    else :
    $menu = JFactory::getApplication()->getMenu();
    $active = $menu->getActive();
    $itemId = $active->id;
    $link1 = JRoute::_('index.php?option=com_users&view=login&Itemid=' . $itemId);
    $returnURL = JRoute::_(ContentHelperRoute::getArticleRoute($item->slug, $item->catid));
    $link = new JUri($link1);
    $link->setVar('return', base64_encode($returnURL));
    endif; ?>

    <section class="readmore">
    <a class="btn btn-default" href="<?php echo $link; ?>"><span>

    <?php if (!$item->params->get('access-view')) :
    echo JText::_('COM_CONTENT_REGISTER_TO_READ_MORE');
    elseif ($readmore = $item->alternative_readmore) :
    echo $readmore;
    if ($params->get('show_readmore_title', 0) != 0) :
    echo JHtml::_('string.truncate', ($item->title), $params->get('readmore_limit'));
    endif;
    elseif ($params->get('show_readmore_title', 0) == 0) :
    echo JText::sprintf('COM_CONTENT_READ_MORE_TITLE');
    else :
    echo JText::_('COM_CONTENT_READ_MORE');
    echo JHtml::_('string.truncate', ($item->title), $params->get('readmore_limit'));
    endif; ?>

    </span></a>
    </section>
    <?php endif; ?>
    <!----------------------------------------------->

    But later i found out that the problen was with one article which had <div> encoding. Tha’s why the side bar was starting at the footer.

    Again thanks for your help!

    phang Friend
    #979949

    Hi,

    Can you help me to find the file "layoutsjoomlacontentblog_style_default_item_title.php"

    Thanks

    phang Friend
    #979951

    And I would like to change the size of heading of leading article in the Magazine template of Purity

    Saguaros Moderator
    #980451

    Hi,

    You can find it in template directory: ROOT/purity_iii/templates/purity_iii/html/layouts/joomla/content/

    if there is no override there, it will inherit the override from T3 framework: ROOT/purity_iii/plugins/system/t3/base-bs3/html/layouts/joomla/content/

    Hope this helps.

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

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

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