1

I am using ExpressionEngine 2.5.2 with Multisite Manager installed.

I have a blog that is pulling entries from two different sites. I am able to successfully show those entries on the main blog page, but I am having trouble linking the entry to the correct site. The code I am using is trying to find all posts on the main site, when some of them exist on the 2nd site. Could someone tell me the correct way to do this? Here is the code on the main blog page:

{exp:channel:entries  channel="news"  site="default_site|characterized" orderby="date"  limit="6"  }
<div class="box">
    <a class="img-holder" href="{url_title_path='news'}">
    <img src="{news_thumbnail}" width="336" height="196" alt="image description" />
</a>
<div class="info">
    <h3><a href="#">{title}</a></h3>
    </div>  
</div>
{/exp:channel:entries}

The part that's not working correctly is a href="{url_title_path='news'}" in the 3rd line above.

1

My favorite way to handle this is to use the {comment_url_title_auto_path} variable (instead of url_title_path=). That will pull that setting from the channel settings.

Does that work for you? Even if you're not using comments, it's a good "permalink" variable.

3
  • This almost works for me, however it's sending the link to 'example.com/entry' instead of 'example.com/channel/entry'. According to the user guide instructions, I see that I need to set the Comment Page URL, however I don't have a "channel Management option under the Admin tab. Is this because I am using 2.5.2 instead of 2.5.5? I cannot upgrade right now, so can you tell me where I can find how to set the correct URL within 2.5.2? I'm having trouble finding it. – jennetcetera Feb 11 '13 at 18:33
  • Oops, I spoke too soon. In ExpressionEngine 2.5.2, you can set the Comment Page URL by clicking Admin > Channel Administration > Channels, then select 'Edit Preferences' for the channel that you would like to edit. The Comment Page URL is under the Path Settings section. Thanks for the help Lisa, this works for me! – jennetcetera Feb 11 '13 at 18:38
  • WOOT! Glad you were able to find it and that you have a solution now! – Lisa Feb 11 '13 at 18:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.