[Petal] repetitive string in attrributes - advice/tactics requested

Bruno Postle bruno at mkdoc.com
Sun Aug 28 21:26:50 BST 2005


On Sun 28-Aug-2005 at 13:38 -0400, jonathan vanasco wrote:
> 
> is there any sort of magic where i would be able to not need to  
> specity the entire string?

> maybe something like:

>   baselink = index.cgi?a=1&b=2&c=3&..
>   href=baselink + attribute specific var

Sure something like this should do it:

  <div
    xmlns:petal="http://purl.org/petal/1.0/"
    petal:define="baselink: index.cgi?a=1&amp;b=2&amp;c=3"
  >
    <a
      href="#"
      petal:attributes="href string:${baselink}${foo}"
    >Click here!</a>
  </div>

-- 
Bruno


More information about the Petal mailing list