deskarrada Posted May 11, 2010 Share Posted May 11, 2010 Hi,I'm new here and started with this whole prestashop thing yesterday, so I still figuring out things.I'm creating my own theme by modifing the existing one that comes with the prestashop pack. I'm changing everything, even the 3 column structure. I've created some more hooks to separate the modules as I please, but since the breadcrumb is not a module, how can I put it into a brand new hook?Thanks in advance!!! Link to comment Share on other sites More sharing options...
deskarrada Posted May 13, 2010 Author Share Posted May 13, 2010 Anyone...? 1 Link to comment Share on other sites More sharing options...
deskarrada Posted May 13, 2010 Author Share Posted May 13, 2010 Please....? Link to comment Share on other sites More sharing options...
Stаn Posted May 13, 2010 Share Posted May 13, 2010 Why don't you just copy/paste the {include} where you want it?Of course you can always remove those includes and implement the breadcrumbs as a Module. Link to comment Share on other sites More sharing options...
deskarrada Posted May 13, 2010 Author Share Posted May 13, 2010 How do I do that (convert the breadcrumb into a module)?Thanks! Link to comment Share on other sites More sharing options...
deskarrada Posted May 13, 2010 Author Share Posted May 13, 2010 BTW, where's the file which inserts the breadcrumb into the center column hook? Link to comment Share on other sites More sharing options...
Stаn Posted May 13, 2010 Share Posted May 13, 2010 In every template that uses breadcrumbs have the following:{include file=$tpl_dir./breadcrumb.tpl}If you want to conver it to Module, you'll need to remove the above code that manually includes the breadcrumbs to the templates. I wouldn't recommend doing this. Just search in which themplates is used breadcrumb.tpl and move the include where you want it to be. Link to comment Share on other sites More sharing options...
Stаn Posted May 13, 2010 Share Posted May 13, 2010 The "breadcrumns" are not added to a conter column hook. They are inserted manually in every file that needs such. Link to comment Share on other sites More sharing options...
deskarrada Posted May 13, 2010 Author Share Posted May 13, 2010 Ok, I'm gonna try it!!!Thanks for answering, I really apreciate it!!! Link to comment Share on other sites More sharing options...
deskarrada Posted May 13, 2010 Author Share Posted May 13, 2010 Ok, I've tried a bounch of things... I'm not really a programmer, just a designer who likes to play a little bit with code, so I get lost easyly.If I remove the {include file=$tpl_dir./breadcrumb.tpl} from every page and place it at the header.tpl it always reads 'Home' even if u're not at home page, that I understand. What I'd like the breadcrumb to be is at the header of every page where it's suposed to be inserted. Right now, if I select a category, when page reloads breadcramb gets located inside the home hook where category contents are shown... Where should I insert {include file=$tpl_dir./breadcrumb.tpl} to always show up at the header of the page, instead of getting placed wherever the category contents go?Thanks, and sorry if I'm bodering with too basic stuff... Link to comment Share on other sites More sharing options...
Stаn Posted May 13, 2010 Share Posted May 13, 2010 There one simple hack for this.1. in breadcrumb.tpl add "id" to the div: should be: 2. in header.tpl add: SCRIPT{literal} jQuery(document).ready(function() { if (jQuery("#old_bc").html()) { jQuery("#bc").html(""+jQuery("#old_bc").html()+""); jQuery("#old_bc").hide(); } }); {/literal}SCRIPT Note that is the place where you want the breadcrumbs to appear"SCRIPT" shuld be the script tag:http://www.w3schools.com/tags/tag_script.asp 2 Link to comment Share on other sites More sharing options...
deskarrada Posted May 13, 2010 Author Share Posted May 13, 2010 It worked!!!!!!! Thanks a lot!!!! Exactly what I wanted!!!!! Link to comment Share on other sites More sharing options...
Gabor@ Posted November 12, 2010 Share Posted November 12, 2010 That would be a great solution for me but I have just tried and does not work. I inserted this <script type="text/javascript">{literal} jQuery(document).ready(function() { if (jQuery("#old_bc").html()) { jQuery("#bc").html(""+jQuery("#old_bc").html()+""); jQuery("#old_bc").hide(); } }); {/literal}</script> before the </head> tag in header.tpl and added id="old_bc" in breadcrumb tpl.I can not find my mistake, please help. Link to comment Share on other sites More sharing options...
Gabor@ Posted November 12, 2010 Share Posted November 12, 2010 inserted this into header and solved the problem <script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script> Link to comment Share on other sites More sharing options...
tony_mik Posted January 30, 2017 Share Posted January 30, 2017 To those who can't display the breadcrumb with this method, you should check out the structure with inspect. In the theme I was using I had a line that was hiding the breadcrumb so I had some "angry time" I ended up including the breadcrumb.tpl file where I needed it, but it was a very nice "hack" and I learned from it. Thanks Stan! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now