Looking for the correct path variable…
Posted: 15 May 2008 09:57 PM   [ Ignore ]  
Summer Student
Total Posts:  7
Joined  08-18-2007

We originally setup EE as only forums (forums.domain.com) with plans to start up a blog at a later time.  We have now setup a blog (blog.domain.com) and the index.php and path.php in the blog subdomain are displaying everything correctly, but the links are wrong.

All the links generated from the templates (ex {path={my_template_group}/rss_2.0}) are http://forums.domain.com/template/rss_2.0 instead of blog.domain.com

I’ve read the docs and know that path= gets info from the general config.  But how can I get the path set in the weblog config (blog.domain.com)?

Profile
 
 
Posted: 16 May 2008 07:59 AM   [ Ignore ]   [ # 1 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  11738
Joined  04-29-2002

Dewey, you need to reset the URL to the root directory of your site found in Admin ›  System Preferences ›  General Configuration.

Does that help?

 Signature 

Quick Reference - EE Trial Options - EE Wiki - Docs for updating a build

Profile
MSG
 
 
Posted: 17 May 2008 02:55 AM   [ Ignore ]   [ # 2 ]  
Summer Student
Total Posts:  7
Joined  08-18-2007

no, because now all the links at forums.domain.com are pointing to blog.domain.com

Profile
 
 
Posted: 17 May 2008 05:39 AM   [ Ignore ]   [ # 3 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  11738
Joined  04-29-2002

In that case, do the following:

Set up a global variable called blog_site.

In it put http://www.example.com/index.php using your actual path to your main site.

Then create a test template like this:

Example template for weblog entries.

{exp:weblog:entries limit="5"}
<a href="{blog_site}/templategroup/template/{url_title}">{title}</a><br />
{/exp:weblog:entries}

Where templategroup/template is the path to your actual template group.

Or in your case:

<a href="{blog_site}/{my_template_group}/rss_2.0">RSS Feed</a>

Make sense?

NOTE: If your site works without index.php, you change {blog_site} to http://www.example.com and take out the / between {blog_site} and {my_template_group}.

 Signature 

Quick Reference - EE Trial Options - EE Wiki - Docs for updating a build

Profile
MSG
 
 
Posted: 17 May 2008 11:11 AM   [ Ignore ]   [ # 4 ]  
Moderator
Avatar
RankRankRankRankRankRankRankRank
Total Posts:  32129
Joined  05-14-2004

Another option is to set the URLs via path.php for your blog subdomain; that will over-ride your general settings and be domain specific.

 Signature 
Profile
MSG
 
 
Posted: 18 May 2008 02:48 AM   [ Ignore ]   [ # 5 ]  
Summer Student
Total Posts:  7
Joined  08-18-2007

Thank you lisa, that worked perfectly!

Profile
 
 
Posted: 18 May 2008 09:12 AM   [ Ignore ]   [ # 6 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  22309
Joined  05-20-2002

Glad that got things working.  We good to close this one out, or are there any lingering issues?

 Signature 

AKA rob1

Help Request TipsPro Network

Profile
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1149, on July 16, 2007 10:33 AM
Total Registered Members: 62610 Total Logged-in Users: 11
Total Topics: 77108 Total Anonymous Users: 11
Total Replies: 416361 Total Guests: 125
Total Posts: 493469    
Members ( View Memberlist )
Newest Members:  redarcEbbyWolfCIfan1000grayskwrlcornernotetriplexwengbaoshanGenki1gabewellsGlauco
Active Members:    Brad StreetCrucialDevianceGreg JLeevi GrahammikeejaymoresidedocubeOxygen Smithramonekalsawxiap