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.

MSM, Related Entries, Paths, and nGen File

June 20, 2012 8:34am

Subscribe [2]
  • #1 / Jun 20, 2012 8:34am

    I’ve got a small MSM setup running, with entries from Site A having a nGen File field, and entries from Site B having a relationship field connecting them to Site A’s entries.

    The issue arises when I want to display a link on Site B to the file specified in Site A’s nGen File field. The nGen File fieldtype outputs a relative path to the file, eg. /uploads/file.pdf - without any domain information. So obviously on Site B, I end up with a link to http://www.siteb.com/uploads/file.pdf, which doesn’t exist.

    I’ve tried specifying the site manually by using the {path='siteA:foo/bar'} tag in the same manner in which the {embed='siteA:foo/bar'} tag can be told which site to use, but that function evidently is not included. Obviously I could hard-code the proper domain, but I’d rather not if I can help it. Any suggestions?

  • #2 / Jun 21, 2012 10:35am

    Dan Decker

    7338 posts

    Hi Michael,

    I can appreciate the frustration this makes for you!

    My suggestion would be to assigne a global variable and use that when building your paths.

    Slightly better than hardcoding, since you would be able to change it in one place and have it reflected everywhere.

    Cheers,

  • #3 / Jun 25, 2012 1:16pm

    I guess that’ll have to do. 😊 Has this issue been addressed in 2.x, or should I make a feature request? 😉

  • #4 / Jun 27, 2012 3:15pm

    Dan Decker

    7338 posts

    Hi Michael,

    Has this issue been addressed in 2.x, or should I make a feature request?

    ExpressionEngine 2 has a more robust File Manager, and a native file fieldtype that are both built to work well with MSM. So that’s a tentative “yes” 😊

    Cheers,

     

  • #5 / Jun 29, 2012 9:04am

    (Pssst! You can’t answer “This, or that?” questions with a yes/no response… at least, not without holding a massive machine gun to back you up like me. 😛)

  • #6 / Jul 02, 2012 2:53pm

    Dan Decker

    7338 posts

    Hey Michael,

    Ha! Indeed! My point was that nGen File Field was a third-party solution in ExpressionEngine 1.x which has been superseded with a native solution in ExpressionEngine 2 - so my “yes” was that it has been addressed in EE 2, therefore negating your “that” portion altogether.

    At least, that’s my story 😉

    Cheers,

  • #7 / Jul 04, 2012 6:43pm

    At least, that’s my story 😉

    ...and you’re sticking to it, undoubtedly. 😉 Thanks anyway. 😊

  • #8 / Jul 05, 2012 4:01pm

    Shane Eckert

    7174 posts

    Hey Michael,

    Is there anything else we can help you with?

    Cheers,

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

ExpressionEngine News!

#eecms, #events, #releases