Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

The page view button links were not working too well when editing the…

… dataobject i.e. Draft and Published buttons. For example clicking on Draft button was just showing the published page. This modification seems to resolve the problem.
  • Loading branch information...
commit 3e3f795de579c8b9c03ab2237cf3741176b623a9 1 parent 6be1ae6
James Bolitho authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 code/DataObjects/DataObjectAsPage.php
4 code/DataObjects/DataObjectAsPage.php
View
@@ -145,13 +145,13 @@ public function getCMSFields()
if($this->ID)
{
$color = '#E88F31';
- $links = '<a target="_blank" href="' . $this->Link('?stage=Stage') . '">Draft</a>';
+ $links = '<a target="_blank" href="' . $this->Link() . '?stage=Stage">Draft</a>';
$status = $this->Status;
if($this->Status == 'Published')
{
$color = '#000';
- $links .= ' | <a target="_blank" href="' . $this->Link('?stage=Live') . '">Published</a>';
+ $links .= ' | <a target="_blank" href="' . $this->Link() . '?stage=Live">Published</a>';
if($this->hasChangesOnStage())
{
Please sign in to comment.
Something went wrong with that request. Please try again.