-
Notifications
You must be signed in to change notification settings - Fork 79
PRESIDECMS-3236 export redirect to url #1741
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: stable
Are you sure you want to change the base?
Changes from 2 commits
873adb2
9e6f7ca
ec43afa
fe39de2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,6 +2,7 @@ | |
| * @feature cms | ||
| */ | ||
| component { | ||
| property name="linksService" inject="LinksService"; | ||
|
|
||
| public string function default( event, rc, prc, args={} ){ | ||
| var linkId = args.data ?: ""; | ||
|
|
@@ -13,4 +14,14 @@ component { | |
| return ""; | ||
| } | ||
|
|
||
| private string function dataExport( event, rc, prc, args={} ) { | ||
| var link = getPresideObject( "link" ).selectData( id=args.data ?: "" ); | ||
|
|
||
| if ( !link.recordCount ) { | ||
| return "Link not found"; | ||
| } | ||
|
|
||
| return linksService.getLinkUrl( link.id ); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. duplicate record exists check since the in the |
||
| } | ||
|
|
||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,4 +15,5 @@ component extends="preside.system.base.SystemPresideObject" displayName="URL Red | |
| property name="keep_query_string" type="boolean" dbtype="boolean" required=false default=false; | ||
|
|
||
| property name="redirect_to_link" relationship="many-to-one" relatedto="link" required=true; | ||
| property name="rendered_redirect_link" type="string" dbtype="text" formula="${prefix}redirect_to_link" adminRenderer="none" dataExportRenderer="Link" searchSearchable=false autofilter=false; | ||
|
cursor[bot] marked this conversation as resolved.
Outdated
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. since it is a formula field, dbtype won't required to defined as well as 'searchSearchable' shouldn't be here. (and I think
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| } | ||

Uh oh!
There was an error while loading. Please reload this page.