different category call for MSM? 
Posted: 15 November 2007 04:57 PM   [ Ignore ]  
Summer Student
Total Posts:  10
Joined  07-05-2007

Hi,

I’ve been searching, but haven’t found an answer in the forum/wiki/user database so I’m asking here. 

Earlier today I was running a site (http://web2.mcla.edu/index.php/admissions) and was able to use the following code

{exp:weblog:entries weblog="admissions" category="6" limit="1"}
<div class="sub_headbanner"><strong>{title}</strong></div>
<
div class="content">{page_body}</div>{/exp:weblog:entries}

This would display one entry, no problem.  Then we upgraded to MSM and changed the url from web2.mcla.edu to admissions.mcla.edu - everything looked great but when I changed the template to this:

{exp:weblog:entries weblog="admissions" site="admissions" category="6" limit="1"}
<div class="sub_headbanner"><strong>{title}</strong></div>
<
div class="content">{page_body}</div>{/exp:weblog:entries}

I can’t get anything to show up.  If I remove the category and limit variable, then I can get a full list of entries, but can’t figure out for the life of me how to get the categories to show up.

Related question which is less pressing, but on the same template, I used this code to build a sidebar menu showing all the contents in one category.  When I click into any of the entries, it only shows the title of the entry I’m on and not the whole category list.  I assume this is me being stupid and missing an obvious code, but thought I’d check here as well.

{exp:weblog:entries weblog="admissions" category="6"}
<ul>
<
li><a href="{url_title_path=admissions/value}">{title}</a></li>
</
ul>
{/exp:weblog:entries}

Any ideas? Thanks!
Amy

Profile
 
 
Posted: 16 November 2007 09:10 AM   [ Ignore ]   [ # 1 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  11141
Joined  04-29-2002

Hi, Amy. Let me get a few things set up on my testing MSM install. I’ll be back shortly.

 Signature 

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

Profile
MSG
 
 
Posted: 16 November 2007 09:12 AM   [ Ignore ]   [ # 2 ]  
Summer Student
Total Posts:  10
Joined  07-05-2007

excellent, than you!

Profile
 
 
Posted: 16 November 2007 09:57 AM   [ Ignore ]   [ # 3 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  11141
Joined  04-29-2002

Related question which is less pressing, but on the same template, I used this code to build a sidebar menu showing all the contents in one category.  When I click into any of the entries, it only shows the title of the entry I’m on and not the whole category list.  I assume this is me being stupid and missing an obvious code, but thought I’d check here as well.

You’ll need to add dynamic="off” to your sidebar menu.

As far as your other issue is concerned - what if you create a simple template with just what you need?

{exp:weblog:entries weblog="admissions" site="admissions" category="6"}
<div class="sub_headbanner"><strong>{title}</strong></div>
<
div class="content">{page_body}</div>{/exp:weblog:entries}

I took out your limit variable.

With a simplified template on my sites, I didn’t have any problems.

 Signature 

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

Profile
MSG
 
 
Posted: 16 November 2007 10:04 AM   [ Ignore ]   [ # 4 ]  
Summer Student
Total Posts:  10
Joined  07-05-2007

Hi, this is Ian LaPort, Amy’s confused Apache server admin.  In case this is relevant, and I suspect it might be, our apache config works like this.

- “web2.mcla.edu” is an apache virtual host with a document root of… /opt/www/web2/htdocs
- “admissions.mcla.edu” is also an apache virtual host and its document root is.../opt/www/web2/htdocs/admissions

Inside admissions are two files, index.php (copied from /opt/www/web2/htdocs) and path.php which contains the following…

$system_path = "../eenginesys/";

// ------------------------------------------------------
// MANUALLY CONFIGURABLE VARIABLES
// See user guide for more information
// ------------------------------------------------------
$site_name='admissions';
$template_group = "";
$template = "";
$site_url = "http://admissions.mcla.edu";
$site_index = "";
$site_404 = "";
$global_vars = array(); // This array must be associative

When I created the site called admissions within EEngine, I duplicated the weblogs (and entries), template groups and global variables.

I also set “URL to the root directory of your site” to http://admissions.mcla.edu

Profile
 
 
Posted: 16 November 2007 10:05 AM   [ Ignore ]   [ # 5 ]  
Summer Student
Total Posts:  10
Joined  07-05-2007

The dynamic="off" seems to have done the trick.

Taking the limit off didn’t change the results though.

Profile
 
 
Posted: 16 November 2007 10:22 AM   [ Ignore ]   [ # 6 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  11141
Joined  04-29-2002

But did you simplify the template?

 Signature 

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

Profile
MSG
 
 
Posted: 16 November 2007 10:24 AM   [ Ignore ]   [ # 7 ]  
Summer Student
Total Posts:  10
Joined  07-05-2007

Yes, and it came up blank.

Profile
 
 
Posted: 16 November 2007 10:37 AM   [ Ignore ]   [ # 8 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  11141
Joined  04-29-2002

Ian, about the only change I’d make to the second path.php is to put values in here:

$template_group = “”;
$template = “”;

 Signature 

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

Profile
MSG
 
 
Posted: 16 November 2007 10:38 AM   [ Ignore ]   [ # 9 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  11141
Joined  04-29-2002

Amy, this template you are working with, where is it stored? In the first or second domain?

 Signature 

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

Profile
MSG
 
 
Posted: 16 November 2007 10:44 AM   [ Ignore ]   [ # 10 ]  
Summer Student
Total Posts:  10
Joined  07-05-2007
Sue Crocker - 16 November 2007 10:38 AM

Amy, this template you are working with, where is it stored? In the first or second domain?

Sue, Ian copied the installation, so I believe it is stored in both.

Profile
 
 
Posted: 16 November 2007 10:53 AM   [ Ignore ]   [ # 11 ]  
Summer Student
Total Posts:  10
Joined  07-05-2007

Sue, I think we’ve got it figured out.  I was using the category numbers from the first install, and when Ian copied it over, the category ID numbers changed.

Thanks for helping us investigate this!

Amy

Profile
 
 
Posted: 16 November 2007 11:15 AM   [ Ignore ]   [ # 12 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  11141
Joined  04-29-2002

Glad you were able to figure it out. It can take a while to get used to using the MSM.

 Signature 

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

Profile
MSG
 
 
   
 
 
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: 61028 Total Logged-in Users: 30
Total Topics: 73808 Total Anonymous Users: 16
Total Replies: 398147 Total Guests: 481
Total Posts: 471955    
Members ( View Memberlist )
Newest Members:  tr309purpleoctopusKlaxsonalexwindb-rodMAIDENtreatstruckaungAdrian LeonP.T.