Jump to:

23483 Posts in 18976 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » CTF and backlink tracking

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 604 Views
  • dompie
    Avatar
    Community Member
    88 Posts

    CTF and backlink tracking Link to this post

    Hello everyone,

    I have a class like this:

    class Imageattachment extends DataObject{
       static $db = array(
          'Title'      => 'Varchar(100)'
       );
       static $has_one = array(
          'Image'      => 'Image',
    'Whatever' => 'Class'
       );
       function getCMSFields_forPopup(){
          $fields = new FieldSet();
          
          $image = new ImageField('Image', 'Image you want to add');

          $fields->push($image);
          
          return $fields;
       }
    }


    This works perfectly on any Page I build, except one thing. How do I setup backling tracking for Images?

    I noticed that Backlinks only work, when an image is used directly inside a WYSIWYG but not on DataObjects or Pages. I've looked in the Docs and in the source of wysiwygsh classes, but didn't find anything. Any suggestions?

    604 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.