Abronsyth |
01-08-2016 01:28 PM |
Restyling the adopt manage page
Resolved
I am trying to restyle the .../myadopts/manage/ID# page to actually display adopt data, but it's proving to be difficult. For some reason the methods that work to display data everywhere else in the .../myadopts file does not work right on the manage page. Elsewhere data can be displayed like;
PHP Code:
{$adopt->getTotalClicks()}
And that'll display the total clicks an adopt has accumulated, but that same code does not work within the manage function.
If I could figure out how to at least define things within the manage function then I could get it all working, but I've tried;
PHP Code:
$gender = $this->getField("gender")->getValue();
And it doesn't work...so I'm lost.
Here is my public function manage:
PHP Code:
public function manage(){ $mysidia = Registry::get("mysidia"); $aid = $this->getField("aid")->getValue(); $name = $this->getField("name")->getValue(); $image = $this->getField("image"); $document = $this->document; $document->setTitle("Managing {$name}"); $document->add($image); $document->add(new Comment("<br><br>This page allows you to manage {$name}. Click on an option below to change settings.<br> <a href='http://catisserie.mysidiahost.com/levelup/click/{$aid}'>Play</a> | <a href='http://catisserie.mysidiahost.com/myadopts/stats/{$aid}'>Stats</a> | <a href='http://catisserie.mysidiahost.com/myadopts/bbcode/{$aid}'>Codes</a> | <a href='http://catisserie.mysidiahost.com/myadopts/freeze/{$aid}'>(Un)Freeze</a><br> <ul> <li>Name: {$name} | <a href='http://catisserie.mysidiahost.com/myadopts/rename/{$aid}'>change</a></li> <li>Birthday: date adopted will display here </li> <li>Type: adopt breed will display here</li> <li>Sex: m or f will display here</li> <li>Trade Status: trade status will display here | <a href='http://catisserie.mysidiahost.com/myadopts/trade/{$aid}'>change</a></li> <li>LVL: level will display here</li> <li>Total EXP: number of clicks will go here</li> </ul>")); $document->add(new Image("templates/icons/delete.gif")); $document->add(new Link("pound/pound/{$aid}", " Pound {$name}", TRUE)); }
Sorry again for all of the questions ;~;
|