[pmwiki-users] extend (:include:)

Henrik henrik.bechmann at sympatico.ca
Fri Oct 20 11:20:17 CDT 2006


Patrick (or anyone),

I have extended my (:includefieldpage:) (not yet updated in the cookbook 
pages), to allow for a discreet link in the upper right corner of the 
included block, so that authors can quickly jump to the source page of 
the include for edit. (The link only appears when in edit mode). This is 
a monstrously useful convenience for authors, since we do a lot of 
compilations of pages.

I would like (for other purposes) to extend the core (:include:) 
directive in the same way, but without rewriting it.

IOW I would like to do (pseudo code) :

customincludefunc(includeargs) {
prepend = 'link HTML'
coreincludefunc(includeargs, prepend)
}

The code I use for the prepend is (modified slightly for presentation here)

  if ($markeron) {
    $itext = Keep('<div title="go to ' .  $thePageName . '" 
style="float:right;background-color:#7ed084;border-width:2px;border-style:solid;border-color:#aaa 
#555 #555 #aaa;">') . '[-[['  . $thePageName . "| w ]]-]" . 
Keep('</div>') . "\n\n" . $itext;
  }

Would there be a clean way to do this?

Thanks,

- Henrik

-- 

Henrik Bechmann
www.osscommons.ca
www.bechmannsoftware.com
Webmaster, www.dufferinpark.ca





More information about the pmwiki-users mailing list