Go Back   WarriorForum - Internet Marketing Forums > Warrior Support Forums > Programming Talk
Register Blogs FAQ Social Groups CalendarHelp Desk

Reply
 
LinkBack Thread Tools
Old 06-22-2009, 06:11 PM   #1
Warrior Member
War Room Member
 
Join Date: Jun 2009
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Server Side Includes for Multiple Blogs on One Domain

Am working with an existing (html) website that has a server side include to handle the navigation. Am planning to keep what already exists and am now adding multiple "blogs" using wordpress installations, to expand the site. Have managed to get that happening with my first few "test-blogs". So the "add ons" are
domainname.com/newblog1/
domainname.com/newblog2/
Etc.

These multiple blogs are created by copying the original files, changing one line in the config file, then installing. All are running out of the same database, just different departments of it.

I want to integrate the existing navigation for the original site into these "new blogs". Thought I had the solution using the WP "include it" plugin, but that didn't solve the problem. I couldn't get it to "call up" the file when I used their recommended code: [include file=filename]

That code was added to the sidebar.php template file

I was trying to "call up" the original navigation file. I tried renaming it to be a php file extension. That didn't work.

I did find a partial solution by using <?php include (navfile.php");?>
into the sidebar.php file.

I say partial, as the only way this worked was by putting a copy of "navfile" into the folder with the rest of that "newblog" files.

That means that I have to update the "navfile" with the "newblog" URL, and then will have to upload the updated "navfile" to every "newblog" folder that ends up on this site. OK when there are only a few "newblogs", but will be a pain if there are dozens, or more "new blogs".

Is there a solution that would enable me to update the "navfile", upload that file once, and have the "newblogs" access that file.

Appreciate any advice.
ByTheC
BytheC is offline   Reply With Quote
Old 06-23-2009, 10:01 AM   #2
Gary
 
GB2008's Avatar
 
Join Date: Jan 2009
Location: Dallas, TX
Posts: 135
Blog Entries: 1
Thanks: 13
Thanked 9 Times in 9 Posts
Social Networking View Member's Twitter Profile 
Contact Info
Send a message via Skype™ to GB2008
Default Re: Server Side Includes for Multiple Blogs on One Domain

You should be able to do this by referencing the full path to "navfile.php" - right now, your include statement assumes the same directory, but if you rewrite it as "/html/mymenu/navfile.php" or whatever your path looks like, then it should find the right place every time.

GB2008 is offline   Reply With Quote
Reply

  WarriorForum - Internet Marketing Forums > Warrior Support Forums > Programming Talk

Tags
blogs, domain, includes, multiple, multiple blogs, server, serversideincludes, side

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT -6. The time now is 11:25 PM.