When you list the note, it could be nice to see the origin of the note with a link to display the sticky in context.

Comments

ndm’s picture

Status: Postponed » Active

I have add the code bellow in views_handler_field_link_path.inc. This is not a good solution because this make another query for each notes, but maybe you can use a little of this.

This works for me.

  function options_form(&$form, &$form_state) {
    parent::options_form($form, $form_state);
    $form['link_to_page'] =...;

    $form['rewrite_with_title'] = array(
      '#title' => t('Rewrite path with node title'),
      '#description' => t('This will override any other link you have set.'),
      '#type' => 'checkbox',
      '#default_value' => !empty($this->options['rewrite_with_title']),
    );

  }

  function render_link($data, $values) {
     ...
    if(!empty($this->options['rewrite_with_title'])){
      $nid = preg_replace("/node\//", "", $data);
      $result = db_query_range('SELECT n.title FROM {node} n WHERE n.nid = %d', $nid, 0, 1);
      $res = db_fetch_object($result);
      $this->options['alter']['alter_text']=true;
      $this->options['alter']['text']=$res->title;

    }
    return $data;
  }
berliner’s picture

Status: Active » Postponed

What you suggest is to show a node title as the links label, right? You can already output the page that a sticky has been created on, using the field "Sticky notes: Path", but the link label will be the referenced drupal url.

Since sticky notes can be attached to any kind of page, not only node pages, but also admin pages or views pages for example, it wouldn't make much sense to show the node title as the label of the link. I understand your interest in this though. I will have a look at this as soon as I find the time.

damiandab’s picture

Status: Active » Postponed

Hello,

I'm also intrested in this feature, to could display node title. I'm using stickynotes to make notes for video tutorials,
it woud be great to have the possibility to see for what video I made a note and also sort them by title.

Great module!!

Best,
Damian

damiandab’s picture

Status: Postponed » Active

subscribing

berliner’s picture

I added this feature into the dev branch. For each note the title of the source page is now saved. For node pages this should be the node's title. You can access it in the configuration of your view, default or custom. Don't forget to run update.php.

Please give feedback whether this is what you were looking for.

berliner’s picture

Status: Active » Fixed

I assume this is fixed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.