[pmwiki-users] Using inote markup as a systemwide LatestNews	flag/sticky
    Patrick R. Michaud 
    pmichaud at pobox.com
       
    Thu Aug 11 17:51:54 CDT 2005
    
    
  
On Thu, Aug 11, 2005 at 05:21:01PM +0100, K.A.Bouton wrote:
> I have been looking into postitnotes, stickynotes and inotes.
> Has one takenover from the others?
I'm currently pushing for a new version of postit/stickynotes, based
on wikistyles.  I've put some examples at 
http://www.pmwiki.org/wiki/Test/Sidenotes .
First, note that one can easily define a %sidenote% wikistyle with:
    %define=sidenote rframe width=150px font-size=smaller%
Then, to create a sidenote, one can write
    %sidenote%  Here is my sidenote.
Or, to include things like paragraphs or lists, one can use
    >>sidenote<<
    Here is my sidenote.
    >><<
If you really want something that looks like a "Post-It"(TM) note,
then set the background color:
    %define=postitnote sidenote bgcolor=yellow%
    >>postitnote<<
    Here's a Post-It note
    >><<
    %postitnote bgcolor=#e0e0ff% And here's a blue post-it!
So, to get back to your goal...
> With markup extension inote its nice to use the include page to create a
> stickynote on all farm field homepages when there is something I need to let
> everyone know eg Main.LatestNews
With wikistyles you can do:
    >>rframe width=200px font-size=smaller<<
    (:include Main.LatestNews:)
    >><<
> 1) I want the header in the sticky note to read the the (:title:) of the
> page I am calling in
    >>rframe width=200px font-size=smaller<<
    {$Title}
    (:include Main.LatestNews:)
    >><<
or you can put the {$Title} itself into the LatestNews page.
> 2) I don't want the edit link (I have hand edited the extendmarkup file to
> remove this but thhere should be another way so I don't overwrite this with
> updates)
The edit link isn't there by default.  It's easily added by placing
[[Main.LatestNews?action=edit | edit news]] somewhere in either the
frame or in the LatestNews page itself.
> 3) I want to be able to set the color of the sticky note as is done with the
> postitnote extension.
    >>rframe width=200px font-size=smaller bgcolor=yellow<<
> 4) And - getting fancier - Would be nice if I could use it conditionally by
> date - if date of LatestNews is older that 30 days don't show it
Ooooh, that one is trickier.  We'd probably need a custom condition
for that --
    (:if lastmodified Main.LatestNews 30:)
    >>postitnote<<
    (:include Main.LatestNews:)
    >><<
    (:ifend:)
although I'd have to figure out the exact syntax I want to use here.
Hope this helps...?
Pm
    
    
More information about the pmwiki-users
mailing list