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.

channel_url in related entries: wrong value

July 16, 2010 3:09pm

Subscribe [3]
  • #1 / Jul 16, 2010 3:09pm

    Lasisto

    5 posts

    There are two channels: news (with custom relation field related_map and locations.

    I put the following in one template:

    {exp:channel:entries channel="news" limit="1"}
    ...
    {related_entries id="related_map"}
    {channel_url}
    {/related_entries}
    {/exp:channel:entries}

    The result for channel_url is an URL which is only configured in the general configuration. Neither the “news” nor the “location” channel has this value. If I change channel_url to channel_title I get the correct value for the location channel. Is this a bug?

  • #2 / Jul 16, 2010 8:39pm

    Brandon Jones

    5500 posts

    Lasisto,

    Do you have a custom field named channel_url?

  • #3 / Jul 21, 2010 3:09am

    Lasisto

    5 posts

    Hi Brandon,

    no, I don’t have a custom field channel_url. I want to get the value from the channel’s path settings. Inside the entries tag this works, but inside the related_entries the variable behaves odd.

  • #4 / Jul 21, 2010 5:01am

    John Henry Donovan

    12339 posts

    Lasisto,

    If I recreate what you have then the variable {channel_url} will show whatever I have in my Channel Preferences under Path Settings. So check this setting for your news and location channels. Clear your cache to see if this helps also.

  • #5 / Jul 21, 2010 5:09am

    Lasisto

    5 posts

    It was the cache! Sorry ...

  • #6 / Jul 21, 2010 5:11am

    John Henry Donovan

    12339 posts

    No problems. Feel free to start a new thread if you have any more questions.

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

ExpressionEngine News!

#eecms, #events, #releases