Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • nooran Developer
    #196459

    Hello,

    I’m using JA Purity III, I would like to learn this:

    When creating a new block using this file: site-name/templatestemplate-name/tpls/corporate.php

    How is it possible to create a new css class to be completely separated from any existing css coding?
    Is that possible or not?

    Best Regards
    Raffet Ali

    TomC Moderator
    #529561

    Perhaps the following tutorial may be of assistance –> How To Use Module Class Suffix in Joomla

    Pankaj Sharma Moderator
    #529571

    <em>@nooran 419962 wrote:</em><blockquote>Hello,

    I’m using JA Purity III, I would like to learn this:

    When creating a new block using this file: site-name/templatestemplate-name/tpls/corporate.php

    How is it possible to create a new css class to be completely separated from any existing css coding?
    Is that possible or not?

    Best Regards
    Raffet Ali</blockquote>

    Hello..
    if you want to add a new block in the corporate.php file . You need to define the new css for this block.
    Corporate.php contains
    <?php $this->loadBlock('header') ?>

    <?php $this->loadBlock('slideshow') ?>

    <?php $this->loadBlock('spotlight-1') ?>

    <?php $this->loadBlock('mainbody') ?>

    <?php $this->loadBlock('spotlight-2') ?>

    <?php $this->loadBlock('spotlight-3') ?>

    <?php $this->loadBlock('footer') ?>

    these blocks.
    IF , You want to add a new block in that case you need to add the new block php file in

    site-name/templatestemplate-name/tpls/blocks/new_block.php
    Then add this new block in corporate.php file like above blocks (position of the block is according to your need)

    <?php $this->loadBlock('new_block') ?>

    Now if you want to add new css classes for your new block , you need to create it yourself and add it into custom.css.

    If you want to add the existing css classes from on existing blocks (like you mentioned in post)
    you can fine All the css classes in Template.css.
    You can use the same class name if you want to add same property of a class . In that case no need to define new css. just add the existing class name.

    Note : When you are adding a new block for creating new module positions , don’t forget to define it in site-name/templatestemplate-name/tpls/blocks/new_block.php

    And in /template/ template-details.xml file.

    Hope it Helps

    nooran Developer
    #529932

    Hello,

    Very sorry for the delay … and really thanks a lot for your reply.

    Actually, here is what I did, but it didn’t work:

    1- I opened the file: site-name/templatestemplate-name/tpls/corporate.php
    2- Added this code:

    <?php $this->loadBlock('mycopyright') ?>
    just right after the “footer” block.
    3- Actually I have also added the a div sestion including my new class, this way:

    <div class="my-copyright">
    <?php $this->loadBlock('mycopyright') ?>
    </div>

    and then saved everything.
    4- I opened the file: site-name/templatestemplate-name/tpls/blocks/footer.php
    and saved it as: mycopyright.php
    5- I did this changes to the file: ../tpls/blocks/mycopyright.php

    <?php
    /**
    * @package T3 Blank
    * @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
    * @license GNU General Public License version 2 or later; see LICENSE.txt
    */

    defined('_JEXEC') or die;
    ?>
    <!-- BACK TOP TOP BUTTON -->
    <div id="back-to-top" data-spy="affix" data-offset-top="300" class="back-to-top hidden-xs hidden-sm affix-top">
    <button class="btn btn-primary" title="Back to Top"><i class="fa fa-caret-up"></i></button>
    </div>
    <script type="text/javascript">
    (function($) {
    // Back to top
    $('#back-to-top').on('click', function(){
    $("html, body").animate({scrollTop: 0}, 500);
    return false;
    });
    })(jQuery);
    </script>
    <!-- BACK TO TOP BUTTON -->

    <!-- FOOTER -->
    <footer>

    <?php if ($this->checkSpotlight('mycopyright', 'copyright-1, copyright-2, copyright-3, copyright-4, copyright-5, copyright-6')) : ?>
    <!-- COPYRIGHT SPOTLIGHT -->
    <div class="container hidden-xs">
    <?php $this->spotlight('mycopyright', 'copyright-1, copyright-2, copyright-3, copyright-4, copyright-5, copyright-6') ?>
    </div>
    <!-- //COPYRIGHT SPOTLIGHT -->
    <?php endif ?>
    </footer>
    <section class="mycopyright">
    <div>
    <div>
    <div>
    <jdoc:include type="modules" name="<?php $this->_p('footer') ?>" />
    </div>
    <?php if ($this->getParam('t3-rmvlogo', 1)): ?>
    <?php endif; ?>
    </div>
    </div>
    </section>

    <!-- //FOOTER -->

    5- I opened the file: site-name/templatestemplate-name/templateDetails.xml
    and added the positions, this way:

    <position>footer-7</position>
    <position>footer-8</position>
    <position>footer-9</position>
    <position>footer-10</position>
    <position>copyright-1</position>
    <position>copyright-2</position>
    <position>copyright-3</position>
    <position>copyright-4</position>
    <position>copyright-5</position>
    <position>copyright-6</position>
    <position>debug</position>

    6- I opened the file: site-name/templates/template-name/css/custom.css
    and added the class css code:

    .mycopyright {
    text-align: center;
    border-top: none;
    font-size: 12px;
    padding-top: 0px;
    margin-bottom: 20px;
    }

    But unfornately, it didn’t work. I think I messed up something..

    Thanks for your precious help and support.

    Regards
    Raffet Ali

    Pankaj Sharma Moderator
    #529996

    Hi @nooran
    i saw you added some wrong classes in the blocks.
    Right now its difficult to figure out the root of issue. Please post your site url here and screenshot to illustrate the issues.

    If possible, you can send via Private message URL and admin credentials of your site, I will help you out.

    ranashanu Friend
    #529997

    @nooran
    <blockquote>3- Actually I have also added the a div sestion including my new class, this way:
    Code:
    <div class=”my-copyright”>
    <?php $this->loadBlock(‘mycopyright’) ?>
    </div> and then saved everything.</blockquote>

    This step is not clear.

    Also i tried replicating what you did. Make sure that you have selected the “Corporate” under the layout in the “Template Manager”

    http://awesomescreenshot.com/08b2mb5h06

    http://awesomescreenshot.com/0472mb534e

    If this doesn’t solve the issue, consider giving access to @pankajsharma

    nooran Developer
    #530012

    Hello @pankajsharma

    Here it is the site url: http://www.numartelsys.com

    I will also send you the login information to the site admin.

    You may check the attached file for illustration.


    1. cssClass
    Pankaj Sharma Moderator
    #530015

    <em>@nooran 420603 wrote:</em><blockquote>Hello @pankajsharma

    Here it is the site url: http://www.numartelsys.com

    I will also send you the login information to the site admin.

    You may check the attached file for illustration.</blockquote>

    Hi nooran
    i saw a lot of customization by you in site-name/templatestemplate-name/tpls/corporate.php
    you added div class on every block to apply new style .

    <div class="my-spotlight-1">
    <?php $this->loadBlock('spotlight-1') ?>
    </div>

    <div class="my-spotlight-2">
    <?php $this->loadBlock('spotlight-2') ?>
    </div>

    <div class="my-spotlight-3">
    <?php $this->loadBlock('spotlight-3') ?>
    </div>

    <div class="my-mainbody">
    <?php $this->loadBlock('mainbody') ?>
    </div>

    <div class="my-footer">
    <?php $this->loadBlock('footer') ?>
    </div>

    <div class="my-copyright">
    <?php $this->loadBlock('mycopyright') ?>
    </div>

    this is not the right way to apply style. you can apply these classes inside … /blocks/file.php

    And you already created Positions copyrights 1 and -2 .
    Also you added <footer > twice in coporate.php file

    One is defined in
    <?php $this->loadBlock('footer') ?>
    and the 2nd is in
    <?php $this->loadBlock('mycopyright') ?>
    According to your post you want to apply a new style in your new block >. mycopyrights.

    Open template/ ja purity/ tpls/blocks/mycopyrights.php
    find
    <div class="container hidden-xs">
    Add you class in the place of
    container hidden-xs
    And define your css in custom.css.
    Also there is no need to load the footer code twice.
    Let me know if it helps


    1. NumarTel-Systems-W.L.L-Administration-Template-Manager-Edit-Style
    nooran Developer
    #530020

    Hello pankajsharma,

    Thanks a lot..
    I will try again based on your reply… I will get back to post feedback.

    Best Regards
    Raffet Ali

    nooran Developer
    #530239

    Hello,

    Yes, it worked very fine with me.. I did a test and it was prefect.

    Really many thanks for your great support and patience.

    Best Regards
    Raffet Ali

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

This topic contains 10 replies, has 4 voices, and was last updated by  nooran 9 years, 11 months ago.

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