joedavis Posted September 16, 2009 Share Posted September 16, 2009 I am working on templating WHMCS to fit my site design. I use a CMS for my main site and it generates my site menu. I am using Jquery to load the menu into the WHMCS template so I don't have to modify the template each time something changes on the site menu. This works quite well except on pages with forms because Smarty is used in the form action. Here is what I have in the header.tpl file for pulling in my site menu: <script type="text/javascript"> {literal} $(document).ready(function(){ $("#LoadSiteMenu").load("http://i7media.net/sitemap.aspx #wrapsitemenu"); }); {/literal} </script> On pages that have forms such as the Client Area Details, the site menu just doesn't appear. I don't get any errors. You can view the site at http://i7media.net/clients. Thanks, Joe 0 Quote Link to comment Share on other sites More sharing options...
joedavis Posted September 16, 2009 Author Share Posted September 16, 2009 I figured it out. It had nothing to do with smarty. FF was not showing the content because I was using a non-ssl url to load the menu. On non ssl pages, this works fine but on ssl pages it doesn't. Anyway, to fix it I did the following: {if $smarty.server.HTTPS eq "on"} <link href='https://i7media.net/Data/Sites/1/skins/i7MEDIA/csshandler.ashx?skin=i7MEDIA' type='text/css' rel='stylesheet' /> <script type="text/javascript"> {literal} $(document).ready(function(){ $("#LoadSiteMenu").load("https://i7media.net/sitemap.aspx #wrapsitemenu"); }); {/literal} </script> {else} <link href='http://i7media.net/Data/Sites/1/skins/i7MEDIA/csshandler.ashx?skin=i7MEDIA' type='text/css' rel='stylesheet' /> <script type="text/javascript"> {literal} $(document).ready(function(){ $("#LoadSiteMenu").load("http://i7media.net/sitemap.aspx #wrapsitemenu"); }); {/literal} </script> {/if} IT WORKS!!!! 0 Quote Link to comment Share on other sites More sharing options...
JofleyUK Posted September 16, 2009 Share Posted September 16, 2009 Nice to see that someone actually posts what they did to sort out a problem. Instead of just saying, i fixed it. 0 Quote Link to comment Share on other sites More sharing options...
Shaun Posted September 17, 2009 Share Posted September 17, 2009 This is a really good idea. I like the idea of loading the menu like that. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.