Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ENHANCEMENT New CMSPreviewable interface class to standardize metadat…
…a making a record previewable by the CMS. ENHANCEMENT New "preview" and "edit" buttons to toggle between preview and cms views. Reinstated utility links to switch between draft and live preview (based on SilverStripeNavigator) (formerly called "AjaxSwitchView")
- Loading branch information
Showing
13 changed files
with
395 additions
and
270 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
/** | ||
* Interface to provide enough information about a record to make it previewable | ||
* through the CMS. It uses the record database ID, its "frontend" and "backend" links | ||
* to link up the edit form with its preview. | ||
* | ||
* Also used by {@link SilverStripeNavigator} to generate links - | ||
* both within the CMS preview, and as a frontend utility | ||
* for logged-in CMS authors in custom themes (with the $SilverStripeNavigator template marker). | ||
*/ | ||
interface CMSPreviewable { | ||
|
||
/** | ||
* @return String Absolute URL to the end-user view for this record. | ||
* Example: http://mysite.com/my-record | ||
*/ | ||
function Link(); | ||
|
||
/** | ||
* @return String Absolute URL to the CMS-author view. Should point to a controller subclassing {@link LeftAndMain}. | ||
* Example: http://mysite.com/admin/edit/6 | ||
*/ | ||
function CMSEditLink(); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.