[Product-Developers] Re: Extracting internal references from a page

Maurits van Rees m.van.rees at zestsoftware.nl
Wed May 28 09:30:16 UTC 2008


Wichert Akkerman, on 2008-05-28:
> Previously Maurits van Rees wrote:
>> When you add a page to your Plone Site and add an internal link in
>> there this gets added to the reference_catalog.  'yourpage.getRefs()'
>> will list that content object your point to as a reference, next to
>> any related items you may have added.  At least that is what happens
>> in Plone 3.0.
>> 
>> But which part of Plone is doing that?  And specifically: how do I
>> trigger the references extraction in a test?
>
> That sounds like plone.app.linkintegrity infrastructure.

Bingo!  And the tests in that package show how to properly test this,
which is like this:

    page.processForm(values={'text': text_template % front_path})

Tests pass now.  Thanks!

I keep grepping only in parts/plone and parts/zope2 and often forget
about all those other packages...

-- 
Maurits van Rees | http://maurits.vanrees.org/
            Work | http://zestsoftware.nl/
"This is your day, don't let them take it away." [Barlow Girl]





More information about the Product-Developers mailing list