Hi,
i’ve just begun to use Modx am i am quite content with this system. After beginning adding content a problem reveals itself that i can’t handle on my own.
The Documentstructure of Modx is a tree - so any Document can only have one parent, when i have understood it correctly.
But i have the problem that i have a Document which schould be published under different parents like:
Persons1:
- a
- b
- c
Persons2:
- d
- e
- a
"a" in both trees schould be the same document. I have solved it for now using a internal weblink fomr Persons 2:a to Persons1:a. But this solution is not what i realy wanted, because using Breadcrumbs after using the link shows "Home >> Persons1: >> a" where should be "Home >> Persons2: >> a".
I am realy witgout a clue what to do? Do i have to fetch the Document out of the Database using a own snippet? Or is there any easier way?
-
MODX Staff
- 12,272 Posts
Does that work well ganeshXL? If so you could create a template consisting of nothing but a "clone source" TV and an @BINDING that pulls in everything ... but I’m not sure and have never done it that way.
What you’re wanting to do will be in the next release on the new codebase (referred to now as 097).
Ryan Thrash, MODX Co-Founder
Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
-
MODX Staff
- 12,272 Posts
I think it just returns the [*content*] field and not the rendered output of the page. Or any TV/meta information for that matter.
Ryan Thrash, MODX Co-Founder
Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
-
☆ A M B ☆
- 24,524 Posts
The code is in manager/includes/tmplvars.commands.inc.php on line 37. It might be an interesting job to make it deal with more than just the content field.
case "DOCUMENT" : // retrieve a document and process it's content
$rs = $modx->getDocument($param);
if (is_array($rs))
$output = $rs['content'];
else
$output = "Unable to locate document $param";
break;