[pmwiki-users] substr markup breaks with httpvariables

edwin marte edwin.marte at leidba.com
Fri Feb 5 09:24:59 CST 2010


I tried too and yes it works.
problem is when trying to evaluate the httpvariable.

Anyway, I did a workaround (At first did not want the aproach but it will
solve the problem) I will use a custom action with the name of the page.

So now I will Point Main.Test?action=0001

and then

year:     {(substr {Test.{$action}$:date} 0 4)}
month:  {(substr {Test.{$action}$:date} 5 2)}
day:      {(substr {Test.{$action}$:date} 8 2)}

That Work for me !

httpvariables are great, I have tried to use them a few times in the past
and they work at first but then when I try mixing with any other recipe they
always bring something that does not work properly or a least the way
expected. I would love to see httpvariables interact better with other
recipes , extensions or plugins.

Thanks,
Edwin


On Fri, Feb 5, 2010 at 8:08 AM, Peter Bowers <pbowers at pobox.com> wrote:

> Could it have to do with the order of processing of httpvariables in
> comparison with markup expressions?
>
> I tried it with a PTV for the {$:page} and it works fine, but I don't
> have httpvariables installed so I couldn't test that...
>
> -Peter
>
> On Thu, Feb 4, 2010 at 8:25 PM, edwin marte <edwin.marte at leidba.com>
> wrote:
> >
> > I have a set of pages with a couple of  page text variables  (PTVs) on
> them
> > of the form yyyy-mm-dd .
> > I need to grab  year , month and day values from them to display in
> another
> > page.
> >
> > I  have a page Test.0001 with  (:date:2009-02-15:)
> >
> > So if I point the browser to Main.Test?page=0001 (using httpvariables)
> and
> > then write  {Test.{$?page}$:date} on it I get 2009-02-15 (working)
> >
> > then I try {(substr  {Test.{$?page}$:date} 0 4)} and I get    {Dec
> >    it breaks somehow ,  I was expecting to get 2009.
> >
> > Any pointers on how to make substr markup work the way I'm doing it ? Any
> > reason why it breaks ?
> >
> > Best Regards,
> > Edwin
> >
> > _______________________________________________
> > pmwiki-users mailing list
> > pmwiki-users at pmichaud.com
> > http://www.pmichaud.com/mailman/listinfo/pmwiki-users
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.pmichaud.com/pipermail/pmwiki-users/attachments/20100205/97ac622f/attachment.html 


More information about the pmwiki-users mailing list