Can anyone confirm that symlinks work in 2.2.14?
I'm trying to determine if there's a system setting I'm missing, or perhaps I'm completely missing how things should be working...
-
☆ A M B ☆
- 476 Posts
Quote from: pauhana at Aug 01, 2014, 12:10 PMCan anyone confirm that symlinks work in 2.2.14?
I'm trying to determine if there's a system setting I'm missing, or perhaps I'm completely missing how things should be working...
So are you trying to redirect one MODX resource to another? In other words, if a visitor goes to:
http://www.example-url.com/page1.html
Are you wanting them to redirect to:
http://www.example-url.com/page2.html
Is that the case? If so, you should be using a weblink, not a symlink. You can read up on symlinks here:
http://rtfm.modx.com/revolution/2.x/making-sites-with-modx/structuring-your-site/resources/symlink/using-resource-symlinks
Precision Web Development ... SmashStack.com
If I want the same information made available from 2 different resources within the doc tree, isn't that done via a symlink? I'm using weblinks to refer to pages that are web pages outside the doc tree, and that works fine...
I'll read through the docs again, and I suppose I could try to force things through a weblink(?)
-
☆ A M B ☆
- 476 Posts
Quote from: pauhana at Jul 30, 2014, 04:05 PMNot sure why, but viewing the symlink page "site/x" does not redirect to the target page "site/y" as expected. The log doesn't show any issue. Can anyone shed light on what's going on here?
Can you clarify this a little more in light of your recent comments above? Are you trying to create a re-direct (which is what I assumed with reading the OP which is where a weblink comes in handy) or are you trying pull content from 1 page to multiple pages? (which is from what I'm reading the function of a symlink unless I misunderstood it)
Precision Web Development ... SmashStack.com
Sorry, I probably confused the issue with the wording of that first post.
I'm looking to access the same resource in two contexts, so I thought I would create a symlink to the first resource. Expected a link to the new resource to produce the same content as that of the original resource. Is this incorrect thinking?
Thanks for your help.
-
☆ A M B ☆
- 476 Posts
Quote from: pauhana at Aug 01, 2014, 11:55 PMI'm looking to access the same resource in two contexts, so I thought I would create a symlink to the first resource. Expected a link to the new resource to produce the same content as that of the original resource. Is this incorrect thinking?
When you say "two contexts", are you really using MODX "contexts" (
http://rtfm.modx.com/revolution/2.x/administering-your-site/contexts) or do you mean that you're simply trying to pull content (i.e. Resource Content or a T.V. value) from one MODX resource to another MODX resource? Can you explain this a little more outlining exactly what you're attempting to do? That will help me help you.
Precision Web Development ... SmashStack.com
Yes, sorry again; I need to learn to choose my words carefully.
Just two different places in the resource tree: I want both places to produce the same content.
discuss.answer
-
☆ A M B ☆
- 476 Posts
Well, you could use getResources to pull data from one Resource in the MODX tree to another, but in our experience, this isn't the most efficient approach. What you're describing we do all the time to allow clients to update site-wide information in one MODX resource. Things like phone numbers or other content that needs to be editable in one place but populated site-wide we use this MODX extra:
http://modx.com/extras/package/setplaceholders
Precision Web Development ... SmashStack.com