Skip to content

Commit

Permalink
Add Link Fragment dialog field for both "internal" and "internalCross…
Browse files Browse the repository at this point in the history
…Context" link types
  • Loading branch information
stefanseifert committed Nov 21, 2023
1 parent e0a96ee commit fe2b1d2
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import io.wcm.handler.link.spi.LinkHandlerConfig;
import io.wcm.handler.link.spi.LinkType;
import io.wcm.handler.link.type.ExternalLinkType;
import io.wcm.handler.link.type.InternalCrossContextLinkType;
import io.wcm.handler.link.type.InternalLinkType;
import io.wcm.handler.link.type.MediaLinkType;
import io.wcm.samples.core.config.AppTemplate;
Expand All @@ -45,6 +46,7 @@ public class LinkHandlerConfigImpl extends LinkHandlerConfig {

private static final List<Class<? extends LinkType>> LINK_TYPES = List.of(
InternalLinkType.class,
InternalCrossContextLinkType.class,
ExternalLinkType.class,
MediaLinkType.class,
WikipediaLinkType.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,18 @@
"items": {
"linkRef": {
"sling:resourceType": "wcm-io/handler/link/components/granite/form/linkRefContainer",
"showLinkTitle": false
"showLinkTitle": false,
"allLinkTypeFields": {
"linkFragment": {
"sling:resourceType": "granite/ui/components/coral/foundation/form/textfield",
"name": "./linkFragment",
"fieldLabel": "Fragment",
"granite:class": "linkRefContainer-option-linktype-showhide-target",
"granite:data": {
"showhidetargetvalues": "internal,internalCrossContext"
}
}
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,18 @@
"items": {
"linkRef": {
"sling:resourceType": "wcm-io/handler/link/components/granite/form/linkRefContainer",
"showLinkTitle": true
"showLinkTitle": true,
"allLinkTypeFields": {
"linkFragment": {
"sling:resourceType": "granite/ui/components/coral/foundation/form/textfield",
"name": "./linkFragment",
"fieldLabel": "Fragment",
"granite:class": "linkRefContainer-option-linktype-showhide-target",
"granite:data": {
"showhidetargetvalues": "internal,internalCrossContext"
}
}
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@
<dependency>
<groupId>io.wcm</groupId>
<artifactId>io.wcm.wcm.ui.granite</artifactId>
<version>1.9.14</version>
<version>1.9.15-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>io.wcm</groupId>
Expand Down

0 comments on commit fe2b1d2

Please sign in to comment.