[pmwiki-users] Disable ? on page link markup

Martin Fick fick at fgm.com
Thu Dec 1 16:17:59 CST 2005


On Thu, Dec 01, 2005 at 04:06:21PM -0600, Patrick R. Michaud wrote:
> On Thu, Dec 01, 2005 at 04:58:59PM -0500, Martin Fick wrote:
> > 
> >   I am still trying to get PageListTemplates to be able to
> > render links without a question mark.  In previous emails I
> > got the following advice,...  but I do not quite understand
> > how to put it together.
> > 
> > 
> > On Wed, Sep 28, 2005 at 11:55:06AM -0500, Patrick R. Michaud wrote:
> > > Why not something more straightforward, such as...?
> > > 
> > >     OtherGroup.NonExistentPage
> > >     %noquest% GroupB.NonExistentPage
> > > 
> > > Here, %noquest% is being used to suppress the '?' of the second 
> > > link.  The CSS to make this happen is
> > > 
> > >     .noquest a.createlink { display:none; }
> > > 
> > > as demonstrated at http://www.pmwiki.org/wiki/Test/NoQuest .
> > 
> > 
> >   Where did  .noquest a.createlink { display:none; }  get
> > injected into the html?  How can my recipe inject this so
> > that I can use %noquest%?  Does it have to be done in a
> > skin?
> 
> The recipe can do:
> 
>     $HTMLStylesFmt['pagetemplates'] = 
>       ' .noquest a.createlink { display:none; } ';


  Hey, that worked, GREAT!!!  Thanks Patrick.  I will be
releasing a new much improved simplified recipe real soon!





> > > >    %noquest% GroupB.NonExistentPage
> > > 
> > > Hmmm, can't the pagelist add the CSS code and the %noquest%
> > > directly to its output...?
> > 
> >   Again, I don't understand this, can I inline CSS?  I
> > understand that a style attribute can be added to a specific
> > tag, but pmwiki does not allow me to do this right?  
> 
> With the above you don't have to style the specific tag.
> The markup 
> 
>     %noquest% GroupB.NonExistentPage
> 
> will be turned into the following html (newlines and '...' added for
> clarity):
> 
>     <span class='noquest'>
>       <a class='createlinktext' href='...'>GroupB.NonExistentPage</a>
>       <a class='createlink' href='...'>?</a>
>     </span>
> 
> So, the CSS entry
> 
>     .noquest a.createlink { display:none; }
> 
> says to not display any <a> element having a class of "createlink"
> (i.e., the '?') that appears inside of any other element having a
> class of "noquest".  Thus the question mark isn't displayed.


  Oh right, now I get it.  Thanks for the explanation.


  -Martin




More information about the pmwiki-users mailing list