#1  
Old 05-09-2012, 07:11 AM
Ejub Bicic @ejubbicic's Avatar
Ejub Bicic @ejubbicic Ejub Bicic @ejubbicic is offline
 
Join Date: May 2011
Location: Sweden
Posts: 12
Question Hide category title on frontpage.

Hi!

I want to hide the category title only on my frontpage of groweco.se. I´ve managed to get the custom made slider hidden if any other page than the frontpage is viewed, but i seem to have some problems when it comes to hiding an element that is built-in by Ecwid.

How do I hide the title? This is what I've got so far, only cart_text part is working:

PHP Code:
       <script type="text/javascript">

        var 
last_hash '';

function 
poll_hash() {
    if(
last_hash !== document.location.hash) {
        
last_hash document.location.hash;
        
add_cart_text(last_hash);   
    }
}

function 
add_cart_text(hash) {
    var 
cart_text document.getElementById('slides');
    
    if (
cart_text) {
    if (
hash.indexOf('mode=category,product') == -1) {
        
cart_text.style.display 'none';
    } else {
        
cart_text.style.display '';
    }
    }
    
    var 
cart_text2 getElementsByClassName('ecwid-productBrowser-head');
    if (
cart_text2) {
    if (
hash.indexOf('mode=category,product') != 1) {
        
cart_text2.style.display ''none;
    } else {
        
cart_text2.style.display '';
    }
    }

}

setInterval(poll_hash100);

</script> 
Thank you for your help!
Reply With Quote
  #2  
Old 05-10-2012, 03:33 PM
Eugene Rimmer's Avatar
Eugene Rimmer Eugene Rimmer is online now
Ecwid Team
 
Join Date: Jan 2011
Location: Ecwid headquarters
Posts: 7,492
Default

You don't need parsing a hash (that's obsolete), nor the polling (that consumes too much resources compared to events), neither even the JavaScript for this.

If the element you want to hide can be addressed with CSS, you can hide it on the particular page of your shop with CSS: http://kb.ecwid.com/w/page/46376921/...
__________________
Eugene Efimochkin, Team
_________________________
Shipping methods are not showing up? Here is how to set it up properly!
Have a question? Look up the answer at our help portal!

⬇ Click Thanks, please, if this reply helped you.
Reply With Quote
  #3  
Old 05-10-2012, 03:37 PM
Ejub Bicic @ejubbicic's Avatar
Ejub Bicic @ejubbicic Ejub Bicic @ejubbicic is offline
 
Join Date: May 2011
Location: Sweden
Posts: 12
Default

Can´t believe I missed that one... Thank you so much Eugene!
Reply With Quote
  #4  
Old 08-18-2012, 03:16 PM
Anne OLeary's Avatar
Anne OLeary Anne OLeary is offline
 
Join Date: Jul 2012
Posts: 2
Default

I want to be able to have a title on the front page and I cant find how to do it. There is a title for all the categories but not for the store front. Anybody be able to shed some light?
Reply With Quote
  #5  
Old 08-19-2012, 02:21 PM
Eugene Rimmer's Avatar
Eugene Rimmer Eugene Rimmer is online now
Ecwid Team
 
Join Date: Jan 2011
Location: Ecwid headquarters
Posts: 7,492
Default

Do you mean something like the image above the products at http://www.ecwid.com/demo-frontend.h... ? This can be done via a category description:
__________________
Eugene Efimochkin, Team
_________________________
Shipping methods are not showing up? Here is how to set it up properly!
Have a question? Look up the answer at our help portal!

⬇ Click Thanks, please, if this reply helped you.
Reply With Quote
Reply

Tags
code

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:23 AM.
Powered by vBulletin® Version 3.8.6. Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.