We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 32004
    • 24 Posts
    Hi

    i have a resource (Symlink)

    .

    Into the template i have:
    [[*class_key]]


    The template gives me back:
    modDocument


    But this is not correct. It must be: modSymLink

    So i have created a small snippet:
    <?php
    $classkey = $modx->resource->get('class_key');
    $output .= '' . $classkey . '';
    return $output;


    The same problem. I don't understand.

    Some ideas or solutions?
      • 4172
      • 5,888 Posts
      you will allways get the class_key of the linked Resource at parsing-time, because a symlink sends forward to that Resource.
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 32004
        • 24 Posts
        @Bruno,
        vielen Dank.

        To all:
        I found this snippet, works perfectly: http://modx.com/extras/package/canonical