mattwal Posted March 20, 2009 Share Posted March 20, 2009 Hello everyone, I am currently developing a blog site for myself. I've been looking into template engines but i'm not sure that's what I need? Using the template system: <?php // Index Page // Define Page TITLE define('TITLE', 'MWDesigns: Home'); // Address ERROR Handling ini_set ('display_errors', 1); error_reporting (E_ALL & ~E_NOTICE); include ('./pages/functions.php'); require ('./assets/header.php'); // Sart of Main Content // // End of Main Content // require ('./asstes/footer.php'); ?> The main content area is the only part of my template that needs to change dynamically. I could just make multiple files and use include to import the right content file for each page. But this is not really working for me. I need to somehow figure out how to write a script that: [*]Depending on what link is clicked. Load the page into the content area [*]Only use as few files as necessary but can load many different content files I'm still learning PHP and such I don't know how I could even go about this or if its worth looking into? If anyone has any idea's or examples that might be usful I would really appreciate it. I'm not looking for a handout or code just given to me. I just need some guidance and a few examples to base it off of Quote Link to comment https://forums.phpfreaks.com/topic/150262-solved-dynamic-content-loader/ Share on other sites More sharing options...
redarrow Posted March 20, 2009 Share Posted March 20, 2009 Was gong to say use get, then i here the word content area,? explain please. Quote Link to comment https://forums.phpfreaks.com/topic/150262-solved-dynamic-content-loader/#findComment-789177 Share on other sites More sharing options...
mattwal Posted March 20, 2009 Author Share Posted March 20, 2009 The content area I'm speaking of is the main text, images, etc of my template. In other words the main bulk of information. E.G. You have a blog - the main content area is where it would show the title and post? Maby this would explain it better. <?php // Index Page // Define Page TITLE define('TITLE', 'MWDesigns: Home'); // Define SECTION define('SECTION', 'Frontpage'); // Define PAGE define('PAGE', 'Blog Index'); // Address ERROR Handling ini_set ('display_errors', 1); error_reporting (E_ALL & ~E_NOTICE); // Include MySQL info include ('./assets/connect.php'); // Include header information require ('./assets/header.php'); // Sart of Main Content Area // include ('./pages/content.php'); // End of Main Content // //Include Footer information require ('./assets/footer.php'); ?> Quote Link to comment https://forums.phpfreaks.com/topic/150262-solved-dynamic-content-loader/#findComment-789225 Share on other sites More sharing options...
redarrow Posted March 20, 2009 Share Posted March 20, 2009 You jumped in the deep end , Why not create your own templates m8. Quote Link to comment https://forums.phpfreaks.com/topic/150262-solved-dynamic-content-loader/#findComment-789232 Share on other sites More sharing options...
mattwal Posted March 20, 2009 Author Share Posted March 20, 2009 thanks... I'm just gonna stick with with my current way of doing things. Really no need for template system. Quote Link to comment https://forums.phpfreaks.com/topic/150262-solved-dynamic-content-loader/#findComment-789901 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.