You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Hervé Boutemy (JIRA)" <ji...@apache.org> on 2016/02/07 21:35:39 UTC

[jira] [Closed] (DOXIASITETOOLS-150) create a "isLink(href)" function for use in skins

     [ https://issues.apache.org/jira/browse/DOXIASITETOOLS-150?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hervé Boutemy closed DOXIASITETOOLS-150.
----------------------------------------
    Resolution: Fixed
      Assignee: Hervé Boutemy

> create a "isLink(href)" function for use in skins
> -------------------------------------------------
>
>                 Key: DOXIASITETOOLS-150
>                 URL: https://issues.apache.org/jira/browse/DOXIASITETOOLS-150
>             Project: Maven Doxia Sitetools
>          Issue Type: New Feature
>          Components: Decoration model
>    Affects Versions: 1.6
>            Reporter: Hervé Boutemy
>            Assignee: Hervé Boutemy
>             Fix For: 1.7
>
>
> many skins copy/paste following code:
> {code} #if ( $href.toLowerCase().startsWith("http:/") || $href.toLowerCase().startsWith("https:/") ||
>     $href.toLowerCase().startsWith("ftp:/") || $href.toLowerCase().startsWith("mailto:") ||
>     $href.toLowerCase().startsWith("file:/") || ($href.toLowerCase().indexOf("://") != -1) ){code}
> putting this as a function available from skins will improve their maintenance
> one idea is to add this code as a method of decoration model, which is already available in skins as {{$decoration}} variable: this would permit to replace previous snippet with
> {code}#if $decoration.isLink($href){code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)