Created
September 20, 2013 15:21
-
-
Save UberNick/6639158 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
String defaultPostName = ""; | |
//Below is logic to default posts based on page selectors. | |
//e.g. posts.{post-name.}.html | |
String selectorPath = currentPage.adaptTo(Resource.class).getResourceMetadata().getResolutionPathInfo(); | |
String selectors[] = selectorPath.split("\\."); | |
if (selectors.length > 2) { | |
defaultPostName = selectors[1]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment