Questions and Answers

How do I collect points?

  • +4
    Chosen as best answer
  • +1
    Posted answer
  • +1
    Posted question
  • +1
    Thumb up
  • -1
    Thumb down
5

by Dulisha in Coding about December 14, 2011 open - report

Profile LINK In Widget.

Hello here, i have been worked on custom widget and i want to add a member url.

I'm working in application\modules\User\widgets\home-photo/index.tpl

I would like to extend the widget with adding url to members title.

 

This code present the Member Name and Last Name

<?php echo $this->viewer()->getTitle(); ?>

 

 

My Public Function in Controller looks like this:

 

public function indexAction()
  {
    // Don't render this if not logged in
    $viewer = Engine_Api::_()->user()->getViewer();
    if( !$viewer->getIdentity() ) {
      return $this->setNoRender();
    }
  }

 

How i can add a link <a href="linktomember"> </a> ?

Thanks

Answer: 1  •  Score 0  •  Views: 1893

1 Answer
Browse by
  • 17

    by Medici Medici about January 21, 2012

    Not sure if this will help - but is the removed line something like what you are looking for?

     

     

           <?php if( !$this->message_view ):?>
            - <?php echo $this->htmlLink(Array('module'=> 'activity', 'controller' => 'index', 'action' => 'share', 'route' => 'default', 'type' => 'album_photo', 'id' => $this->photo->getIdentity(), 'format' => 'smoothbox'), $this->translate("Share"), array('class' => 'smoothbox')); ?>
            - <?php echo $this->htmlLink(Array('module'=> 'core', 'controller' => 'report', 'action' => 'create', 'route' => 'default', 'subject' => $this->photo->getGuid(), 'format' => 'smoothbox'), $this->translate("Report"), array('class' => 'smoothbox')); ?>
            <?php /*   MEDICI REMOVED MAKE PROFILE PHOTO LINK echo $this->htmlLink(array('route' => 'user_extended', 'module' => 'user', 'controller' => 'edit', 'action' => 'external-photo', 'photo' => $this->photo->getGuid(), 'format' => 'smoothbox'), $this->translate('Make Profile Photo'), array('class' => 'smoothbox')) */ ?>
            <?php endif;?>
     

    • Score: 0
You must login to post an answer.