AFAIK, 이것은 심볼릭 링크의 예상되는 동작입니다.
난 그냥 내 테스트 서버에 약간의 테스트를 발사하고 여기 결과입니다 : 없음 심볼릭 링크
의 getResource (패키지 관리에서 설치) 반환 : 심볼릭 링크를 가리키는의 ID가
6 경우입니다 (10)의 ID와 페이지 :
[[!getResources? &resources=
6 ]]
는 반환합니다
Array (
[id] => 6
[type] => document
[contentType] => text/html
[pagetitle] => My Symlink
[alias] => my-symlink
[link_attributes] =>
[published] => 1
[parent] => 0
[isfolder] =>
[introtext] =>
[content] =>
[richtext] =>
[template] => 1
[menuindex] => 2
[searchable] => 1
[cacheable] => 1
[createdby] => 1
[createdon] => 2011-03-25 09:43:31
[editedby] => 1
[editedon] => 2011-03-25 09:57:30
[deleted] =>
[deletedon] => 0
[deletedby] => 0
[publishedon] => 2011-03-25 09:43:00
[publishedby] => 1
[menutitle] =>
)
콘텐츠 키가 비어 있습니다.
MODx 포럼의 사용자 lkossis는 또 다른 접근법을 제안합니다. 스 니펫을 사용하여 [[*content]]
값을 얻습니다.
$id= isset($id) && intval($id) ? intval($id) : $modx->resource->get('id');
$field = isset($field) ? $field : 'id';
$thisDocument=$modx->getDocument($id);
return $thisDocument[$field];
그리고 템플릿에
는 :
[[!getDocumentField? &field=`content`]]
크레딧은 MODx 포럼에 lkossis 간다. http://modxcms.com/forums/index.php/topic,61784.msg351101.html#msg351101