I update information on my sidebars weekly. Is there anyway to only change the information in one place versus going through 4 templates to change the information?
For example: If I want to add someone to my blogroll (even though I use blogrolling most of the time....it's just an example), I have to go to my Main Archive, Date Category, Individual Archive and Category Archive Templates to change it.
If anyone has any suggestions that work, I'll give ya a big fat virtual kiss...or buy ya a drink. I'd prefer the drink! :-)
Posted by Sissy at August 9, 2005 03:48 AM | TrackBackSissy, what I did is turned my left and right menus into their own files, named them leftmenu.php (for example) and then included them where I wanted them to display at with the following php syntax:
<?php include "http://www.ericsgrumbles.net/scripts/leftmenu.php"; ?>When I want to make a change, I make it in the file locally, then FTP to the scripts folder that I created. And, voila, it updates. No need for rebuilds or modifying templates now.
Sometime in the near future I'll be posting a HowTo that is more detailed on my blog.
Posted by Eric at August 9, 2005 05:10 AMOR... you could use an MT include statement and link to a "master sidebar" module. You would create a new module from your manage templates screen... it is the box at the bottom of the page... you might want to review the MT users manual foir explicit instructions.
Posted by Madfish Willie at August 9, 2005 05:03 PMYou might try a search on MuNuviana for "php includes" or "MT includes"
Posted by Madfish Willie at August 9, 2005 05:05 PMEither way will work. The drawback to MT Includes is that you have to do a rebuild, so it wouldn't do what Michele wants.
Posted by Eric at August 10, 2005 05:56 AMEric: Wouldn't the rebuilds be done after the next post if it wasn't done manually at the time of edit/save the template module? I don't remember doing manual rebuilds when I changed my modules, but it's been several months since I messed around with my templates, so....
Posted by Madfish Willie at August 10, 2005 03:15 PMI thought the rebuild during a post only affected the index page and the specific archives involved in the post?
Posted by Eric at August 12, 2005 01:43 AMEric: Actually, if the MT include is in the template file, then after the first rebuild to change all the pages to the new template, just updating the include module would change all the related archive files. The rebuilt files would then just import the include module into the file for viewing. [I'm pretty sure this is the case]
Hmmmmm, I'll try it and find out. I just made a module change. Instead of doing a manual rebuild, I'll post something and let it rebuild.
Posted by Eric at August 13, 2005 08:13 PMOkay, I updated a module, then posted a new entry rather than doing a manual rebuild of everything. The rebuild while posting rebuilt my indexes, the individual archive and the date archive. It did not, however, rebuild all of the date and individual archives, only the ones containing the new post and it did not rebuild my category archives at all.
Posted by Eric at August 13, 2005 09:56 PM