Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4102056
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T20:46:36+00:00 2026-05-20T20:46:36+00:00

This is pretty hard to explain… In modX Revolution, I’m trying to get the

  • 0

This is pretty hard to explain…

In modX Revolution, I’m trying to get the symlink’s “Symlink” field in the template to use it in a snippet (the id the symlink is pointing at).

The suggestion when I mouseover that field is [[*content]], but when using that I get the actual content of the page I’m pointing at with the symlink.

Any suggestions? The documentation doesn’t help, and I’ve been google-ing it for an hour now.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T20:46:37+00:00Added an answer on May 20, 2026 at 8:46 pm

    AFAIK, this is the expected behavior for a symlink.

    I just fired up a little test on my testing server and here is the result:

    getResource (install it from Package Management) returns no symlink:

    If 6 is the id of the symlink pointing to a page with the id of 10:

    [[!getResources? &resources=6]]

    will return:

    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] => 
    )
    

    Please note that the content key is empty.

    User lkossis on MODx Forums suggests another approach: using a snippet to get the [[*content]] value.

    $id= isset($id) && intval($id) ? intval($id) : $modx->resource->get('id');
    $field = isset($field) ? $field : 'id';
    
    $thisDocument=$modx->getDocument($id);
    return $thisDocument[$field];
    

    And in your template:

    [[!getDocumentField? &field=`content`]]
    

    The credit goes to lkossis on MODx Forums.
    http://modxcms.com/forums/index.php/topic,61784.msg351101.html#msg351101

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is a bit hard to explain in words ... I'm trying to calculate
it's pretty simple but is kind of hard to explain. I have this image
This is going to be pretty hard to explain, so I'll try to make
I imagine this is a pretty hard question to answer without sitting down and
Now the question is pretty hard. Now this is my main list List<List<KeyValuePair<string, double>>>
This seems like a pretty softball question, but I always have a hard time
inHi, this question is fast, but from my point of view its pretty hard.
I’m trying to create a date in the BC era, but failing pretty hard.
First, sorry for the title, as I'm no native english-speaker, this is pretty hard
This is simple and should work but doesn't, so I'm obviously derping pretty hard

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.