Need help with smarty - method of work

Discussion in 'Programming' started by 11alex11, Apr 4, 2010.

  1. #1
    For those who don't know it: link

    Here is my code:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <style type="text/css">
    	@import "stylesheet.css";
    </style>
    <title>My Art Work</title>
    </head>
    <body>
    <div id="wrapper">
    
     <img src="images/header.jpg" alt="header">
     
    	<div class="topbar">
        	<br />Content/Ads Here<br /><br />
        </div>
    	<div class="topbar_bottom"></div>
    	
    	
    	<div id="menu_container">
    	
    		<div class="menu">
    			<p class="item_top">Google Translate</p>
    			<ul>
    			{*<div id="google_translate_element"></div><script>
    				function googleTranslateElementInit() {
    					new google.translate.TranslateElement({
    						pageLanguage: 'en'
    					}, 'google_translate_element');
    				}
    				</script><script src="http://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>*}
    			</ul>
    		</div>
    		
    		<div class="menu_bottom"></div>
    	
    		<div class="menu">
    			
    			<p class="item_top">Main</p>
    			<ul>
    				<a href="index.php"><li>Home</li></a>
    				<a href="#"><li>Link</li></a>
    			</ul>
    			<p class="item_top">Categories</p>
    			<ul>
    				<a href="index.html"><li>Signatures</li></a>
    				<a href="#"><li>Backgrounds</li></a>
    			</ul>			
    		</div>
    			
    		<div class="menu_bottom"></div>
    
    	</div>
    
    	<div id="content_container">
    		
    		{include file='content.tpl'}
    		
    		<div class="content_bottom"></div>
    	
    		<div class="content">
    			<br />
    			<center>Ads/Content Here</center><br />
    		</div>
    	
    		<div class="content_bottom"></div>
    	
    		<br />
    		
    		{include file='Copyright.tpl'}
    	</div>
    </div>
    
    
    </body>
    </html>
    
    Code (markup):
    I want to change the content block (the center = {include file='content.tpl'} ) when I click on one of the links in the menu. How can I do it? what is the best way to do it?

    I have another problem, How can I insert google translate into it? (pay attention I already put the code but it in comment)

    thanks
     
    11alex11, Apr 4, 2010 IP