Hello,
I am porting a site over from Wordpress to EE, and have gotten all the data squared away for the most part.
When I browse the main blog page on my site I can see that the entries and the authors all match up, however, when I go to an author’s individual blog page, only a few authors actually generate a list of their blog entries.
I am using the query module to find the author (based on segment_1) and then pass that to an embedded template (given the member id) which then shows either the profile or the blog depending on segment 2.
The members for the site (all part of the same field group) are divided into three sections, the freshman (joined this year), the sophmores (joined last year), and the graduates (joined 2 years ago.
However so far only the second group is showing their posts (the first group has no posts, so it is expected that they don’t have any). The graduates do have posts, and they are visible on the main page (which shows everyone’s blog).
If I view a test template outside of the segment_1 if statement, it does show all the graduate’s posts, so I am thinking it is something to do with the query. I have tried to use php to store the value and pass it on, but that didn’t work. Below are two snippets which I tried:
{if segment_1}
{exp:query to get member_id}<?php $var="{member_id}">{/exp:query}
{embed="template_group/template" mem_id="<?php echo $var; ?>"}
{if:else}
home page
{/if}{if segment_1}
{exp:query sql="SELECT member_id FROM ee_members WHERE group_id = '6' AND username = '{segment_1}'"}
{embed="template_group/template" mem_id="{member_id}"}
some page <-- putting the test template here does not work
{/exp:query}
{if:else}
home page <-- putting the test template here works
{/if}Any ideas on what it could be?
Oh, and another thing: all traffic goes to the index page, which embeds the profile page, which embeds the blog page, which embeds either the blog_list page or the blog_entry page (depending on pagination). Not sure if this would have any affect on anything.
Thanks,
Jason
EE v 2.2.0, using MSM
Build: 20110622