ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Linking across MSM sites

June 08, 2010 2:15pm

Subscribe [3]
  • #1 / Jun 08, 2010 2:15pm

    coolstuffchannel

    114 posts

    I am pulling multiple sites into a new portal and have no issue connecting the site so that the content is displayed properly.  I am trying to pull the first paragraph of content and then have the reader link back to the original article from the original site by clicking read more.

    My problem arrives by trying to create a site variable.

    For instance my code pulls from site=“site1|site2|site3”

    How do I set the link path to choose the correct site/weblog/urltitle?  I’ve tried a conditional statement but that didn’t work.

    For example:

    {exp:weblog:entries site="mac|a4p|a4t" weblog="awilt|shullfish|sgentry|apple|applereviews" 
    orderby="date" sort="desc" limit="1" sticky="off" disable="member_data|trackbacks"}
    
    <a href="http://{site}/{weblog}/story/{url_title}}" class="link1"><em><b>Read More</b></em></a>
    {/exp:weblog:entries}

    I’ve tried

    <if site=="mac">info</if>
    <if site=="a4p">info</if>

    however, that is not working either as it’s showing both “infos”

    Any suggestions?

    This question may be related to a resolved thread.

  • #2 / Jun 08, 2010 2:40pm

    coolstuffchannel

    114 posts

    Oops. my “read More” should show like this:

    a href="{site}/{weblog}/story/{url_title}}" class="link1">Read More</a>
  • #3 / Jun 08, 2010 6:04pm

    Ingmar

    29245 posts

    You could probably use {entry_site_id} in a conditional, have you tried that?

  • #4 / Jun 08, 2010 6:17pm

    coolstuffchannel

    114 posts

    Can you show me?

  • #5 / Jun 08, 2010 6:42pm

    Lisa Wess

    20502 posts

    Instead of building the URL yourself, have you tried {comment_url_title_auto_path}?

  • #6 / Jun 08, 2010 6:48pm

    coolstuffchannel

    114 posts

    Wow, that’s almost there!

    Unfortunately it left out some key pieces of the url:

    It drove me to here:

    http://apps4phones.com/index.phpbeejive_updated_for_iphone/

    It should have gone here:
    http://apps4phones.com/index.php/apple/story/beejive_updated_for_iphone/

  • #7 / Jun 08, 2010 7:12pm

    Lisa Wess

    20502 posts

    This variable is replaced by the URL set in the “Comment Page URL” preference under Admin > Weblog Management. The URL Title of the entry will be automatically added

    Did you fill out that path for each weblog?  Doesn’t sound like it. =)

  • #8 / Jun 08, 2010 7:31pm

    coolstuffchannel

    114 posts

    OMG!  should have done this years ago!

  • #9 / Jun 08, 2010 10:41pm

    Brandon Jones

    5500 posts

    Sounds like you’re all set - awesome. Don’t hesitate with further issues.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases