Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • localconnectionsmagazine Friend
    #182192

    Looking to insert a top banner tried different positions (please see the attached image for position) but can’t find top header is this possible

    thanks for looking

    localconnections


    1. bannerhere
    pavit Moderator
    #472740

    Hi

    When you choose the position in module manager manually write top-panel inside it

    Or you need to insert a new position in header

    localconnectionsmagazine Friend
    #472743

    hi pavit,
    thanks for the reply i tried it but top-panel is above the position i need banner in

    pavit Moderator
    #472749

    Ok

    Then you can create a specific position for your banner inside the header

    Goto this file pluginssystemjat3jat3base-themesdefaultblocksheader.php now you have

    defined('_JEXEC') or die;
    ?>
    <?php
    $app = JFactory::getApplication();
    $siteName = $app->getCfg('sitename');
    if ($this->getParam('logoType', 'image')=='image'): ?>
    <h1 class="logo">
    <a href="<?php JURI::base(true) ?>" title="<?php echo $siteName; ?>"><span><?php echo $siteName; ?></span></a>
    </h1>
    <?php else:
    $logoText = (trim($this->getParam('logoText'))=='') ? $siteName : JText::_(trim($this->getParam('logoText')));
    $sloganText = JText::_(trim($this->getParam('sloganText'))); ?>
    <div class="logo-text">
    <h1><a href="<?php JURI::base(true) ?>" title="<?php echo $siteName; ?>"><span><?php echo $logoText; ?></span></a></h1>
    <p class="site-slogan"><?php echo $sloganText;?></p>
    </div>
    <?php endif; ?>

    <?php if($this->countModules('search')) : ?>
    <div id="ja-search">
    <jdoc:include type="modules" name="search" />
    </div>
    <?php endif; ?>

    Add this php code

    <?php if($this->countModules('bannerheader')) : ?>
    <div id="ja-bannerheader">
    <jdoc:include type="modules" name="bannerheader" />
    </div>
    <?php endif; ?>

    So the new header.php file will be

    defined('_JEXEC') or die;
    ?>
    <?php
    $app = JFactory::getApplication();
    $siteName = $app->getCfg('sitename');
    if ($this->getParam('logoType', 'image')=='image'): ?>
    <h1 class="logo">
    <a href="<?php JURI::base(true) ?>" title="<?php echo $siteName; ?>"><span><?php echo $siteName; ?></span></a>
    </h1>
    <?php else:
    $logoText = (trim($this->getParam('logoText'))=='') ? $siteName : JText::_(trim($this->getParam('logoText')));
    $sloganText = JText::_(trim($this->getParam('sloganText'))); ?>
    <div class="logo-text">
    <h1><a href="<?php JURI::base(true) ?>" title="<?php echo $siteName; ?>"><span><?php echo $logoText; ?></span></a></h1>
    <p class="site-slogan"><?php echo $sloganText;?></p>
    </div>
    <?php endif; ?>
    <?php if($this->countModules('bannerheader')) : ?>
    <div id="ja-bannerheader">
    <jdoc:include type="modules" name="bannerheader" />
    </div>
    <?php endif; ?>
    <?php if($this->countModules('search')) : ?>
    <div id="ja-search">
    <jdoc:include type="modules" name="search" />
    </div>
    <?php endif; ?>

    Now goto this file templatesja_universitytemplateDetails.xml and add the new position

    <position>top-panel</position>
    <position>bannerheader</position>

    Now goto templatesja_universitycsstemplate.css and at the end of file add the css style for your new position

    #ja-bannerheader {
    margin-top: 20px;
    }

    Remember that based on your custom-html module you will need to find the right positioning CSS settings also take first a backup that you will modify

    Regards

    localconnectionsmagazine Friend
    #472758

    hi pavit,

    This is the default banner position on most templates. because it is not displaying properly or maybe i am doing something wrong. also it is only to add a slogan in where the banner will be to compliment the logo but i was going to use the banner module to display the slogan that will change depending on the language. Has anyone else put a banner in the position to the right of the logo. I can’t see this should require custom coding but I appreciate the code i just would like confirmation before i alter the template.thanks

    andrew

    localconnectionsmagazine Friend
    #472812

    hi pavit, i didnĀ“t understand why banner position was listed but not used in the template i have used your code andit works perfectly.

    many thanks

    localconnections

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

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

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