[kupu-dev] plone / create external link / title attribute

Stefan Jurisch s.jurisch at siegnetz.de
Tue Nov 27 17:36:49 CET 2007


thanks for these tips. I was able to implement and activate this function.
now i had the idea to apply these changes to the current kupu development branch, but I do not right know, how and where to do that.

if there is an interest in my patch:
where/how do I put it?
Shall I provide it here via this mailinglist as a patch-file or shall I just commit it to the current svn-trunk?

greetz
stefan jurisch



On Mon, Nov 26, 2007 at 09:59:44PM +0000, Duncan Booth wrote:
> Stefan Jurisch <s.jurisch at siegnetz.de> wrote:
> 
> > For a customer I have to implement an additional textfield where this
> > customer is able to input the content for an optional title attrbute
> > while creating an external link. can anyone tell me, how to do that (I
> > can implement it myself, I think, but yet I do not even know, where to
> > locate the files, in which of them I had to add some code!). 
> > 
> 
> Edit 'default/drawers.kupu' the div with id="kupu-drawer" is the HTML for 
> the external link drawer. The input field kupu-linkdrawer-input is the url. 
> After editing any .kupu file you must run 'make plonemacros' from the kupu 
> folder to rebuild the plone wysiwyg macro.
> 
> Look in common/kupudrawers.js (search for kupu-linkdrawer-input to find 
> where it is used). The link itself is created by the call:
> 
>  this.tool.createLink(url, null, null, this.target, null, 'external-link');
> 
> The parameters for createLink are: (url, type, name, target, title, 
> className)
> N.B. In some versions of kupu (all but the latest svn checkout!) the string 
> 'external-link' was passed in the title parameter by mistake.
> 
> So all you have to do is add your own field and pass its value as the 5th 
> parameter to createLink. Also you probably want to initialise the value of 
> your title field from linkel.title in the createContent method.
> 
> _______________________________________________
> kupu-dev mailing list
> kupu-dev at codespeak.net
> http://codespeak.net/mailman/listinfo/kupu-dev
> 
> -- 
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
> 

-- 

Stefan Jurisch
----------------------
SIEGNETZ.IT GmbH
Schneppenkauten 1a
D-57076 Siegen

Tel. +49 271 68193-14
Fax: +49 271 68193-29

http://www.siegnetz.de


Amtsgericht Siegen HRB4838
Geschäftsführer: Oliver Seitz
Sitz der Gesellschaft ist Siegen

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



More information about the kupu-dev mailing list