Breadcrumb appearing below Mainbody position

Responsive Joomla template for Entertainment and Music purpose with clean and lightweight design.
GK User
Mon Sep 24, 2012 1:59 pm
Hi

For my site, I have activated "mainbody before component" for subpages in the Music Template settings. And, I have put a custom html module in "mainbody" position in one of the subpages.

This "mainbody" module is appearing above the component on the page, which is good. However, I have noticed that it is also appearing above the "breadcrumb" position. Is this correct, or am I missing something?

ginniss
User avatar
Senior Boarder

GK User
Mon Sep 24, 2012 3:15 pm
Hi

That's correct.
You want to display breadcrumbs above mainbody position with component also?
User avatar
Platinum Boarder

GK User
Mon Sep 24, 2012 4:48 pm
Seichinha

Thanks for the quick reply.

Yes. Ideally, I'd like to show the breadcrumbs above the mainbody/component positions.

ginniss
User avatar
Senior Boarder

GK User
Tue Sep 25, 2012 1:08 am
Hi again

Well... first let us fix something that i found on this template. It doesn't have any relation with this issue, but it's a bug fix nevertheless ;)

I found that the selection "Disabled on selected pages" option on Font-size switcher doesn't display form field. So please open the following file ../gk_music/admin/scripts.js and find this fragment:

Code: Select all
// tools forms

     if(document.id('jform_params_tools').value != 'selected') document.id('jform_params_tools_for_pages-lbl').getParent().setStyle('display','none');

    document.id('jform_params_tools').addEvents({

               'change' : function() {

            if(document.id('jform_params_tools').value == 'selected') document.id('jform_params_tools_for_pages-lbl').getParent().setStyle('display','block');

            else document.id('jform_params_tools_for_pages-lbl').getParent().setStyle('display','none');

            }

    });


replace with:

Code: Select all
// tools forms

     if(document.id('jform_params_tools').value != 'selected' && document.id('jform_params_tools').value != 'selected_disabled') document.id('jform_params_tools_for_pages-lbl').getParent().setStyle('display','none');

    document.id('jform_params_tools').addEvents({

               'change' : function() {

            if(document.id('jform_params_tools').value == 'selected' || document.id('jform_params_tools').value == 'selected_disabled') document.id('jform_params_tools_for_pages-lbl').getParent().setStyle('display','block');

            else document.id('jform_params_tools_for_pages-lbl').getParent().setStyle('display','none');

            }

    });


This will be added on next update of Music Template.

Now for your issue, the easy solution is to create a second breadcrumbs position. So follow my steps:

1) Open ../gk_music/templateDetails.xml file and add new position after:

Code: Select all
<position>breadcrumb</position>


so it should be

Code: Select all
<position>breadcrumb</position>
<position>breadcrumb2</position>


2) Open ../gk_music/lib/framework/gk.const.php and add replace:

Code: Select all
'breadcrumb' => 'none',


with

Code: Select all
'breadcrumb' => 'none',
'breadcrumb2' => 'none',


3) Open ../gk_music/layouts/blocks/main.php and find line 77:

Code: Select all
<jdoc:include type="modules" name="mainbody" style="<?php echo $this->module_styles['mainbody']; ?>" />


and replace with:

Code: Select all
<?php if($this->modules('breadcrumb2') || $this->getToolsOverride()) : ?>
                        <div id="gkBreadcrumb" class="hide_mbread">
                           <div>
                              <?php if($this->modules('breadcrumb2')) : ?>
                              <jdoc:include type="modules" name="breadcrumb2" style="<?php echo $this->module_styles['breadcrumb2']; ?>" />
                              <?php endif; ?>
                              
                              <?php if($this->getToolsOverride()) : ?>
                                 <?php $this->loadBlock('tools/tools'); ?>
                              <?php endif; ?>
                           </div>
                        </div>
                        <?php endif; ?>
                  
                  <jdoc:include type="modules" name="mainbody" style="<?php echo $this->module_styles['mainbody']; ?>" />



4) Go to Modules Manager and copy breadcrumbs module and publish/assign only on the page that you want to display mainbody position before component.

5) Still on Modules Manager, find the default breadcrumbs module and deselect assignment only on the page that you want to display mainbody position before component.

6) Go to template parameters > advanced settings and enable the use of css override.

7) Open ../gk_music/css/override.css and add this line:
Code: Select all
.hide_mbread + div + div #gkMainbodyWrap #gkBreadcrumb {visibility: hidden}


I think i didn't forget anything.

Remember that this is custom work and you need to take this changes on future updates.

Cheers
User avatar
Platinum Boarder

GK User
Tue Sep 25, 2012 6:20 pm
Hi Seichinha

Many thanks for solution.

Unfortunately, I am unable to get it to work. I have checked the code updates and setting changes mentioned several times and can't see that I've missed anything.

Any ideas?

Cheers

Glenn
User avatar
Senior Boarder

GK User
Tue Sep 25, 2012 11:44 pm
If you did everything as i said, send me administrator access to paulo[at]gavick[dot]com
or send me FTP access also and i will do it.
User avatar
Platinum Boarder

GK User
Thu Sep 27, 2012 1:11 pm
Thanks Seichinha

Login details sent to the email address you indicated.

Cheers

ginniss
User avatar
Senior Boarder

GK User
Sun Sep 30, 2012 7:49 pm
Hi again

Sorry about the delay.
You need just to enable the second breadcrumb module on "breadcrumb2" position.
Now if you open you website on http://www.yourwebsite.com/support you will see what i mean.

I also add the following line on override.css file.
Code: Select all
#gkBreadcrumb.hide_mbread {margin-top: 25px!important}


Cheers
User avatar
Platinum Boarder

GK User
Mon Oct 01, 2012 4:19 pm
Seichinha

Many thanks for your help.

Works perfectly. Really appreciated!

Cheers

ginniss
User avatar
Senior Boarder


cron