[pmwiki-users] wikiform title issues (david roundell)

John Rankin john.rankin at affinity.co.nz
Wed Dec 31 18:48:13 CST 2008


>   4. FW: appending formtitle for wikiforms and also possible title
>      directive bug? (david roundell)
>   5. page actions additional feature request or formtitle	expand
>      url? (david roundell)
>
>
> 
>quote:
> 
>Try setting up a very simple example using wikiforms and a
>field oftype "title" plus one or 2 other test fields of any
>type.Enter "Servername" in the text box of the field of type
>title andwikiforms should take care of the rest. It should
>automaticallywrap the entered text in a (:title:) directive and
>on editing,strip this out so that the above error doesn't
>occur.Let me know if this fixes the problem. If not, could you
>provide alink to a page that displays the undesirable
>behaviour?I am guessing that the (:title ... :) is confusing
>the wikiforms regular expression. This would be why I added a title field type.
> 
>endquote
> 
>thanks for replying john, i did try setting up a little
>wikiform as suggested but the :title: directive still
>resulted in displaying as - :title Servername:):Title:Servername when re-editing the page.

Excuse me for asking this...
Are you entering "(:title The desired title:)" in a text field
or are you entering "The desired title" in a field of type title?

Your FormTemplate should have a line like:

:Servername:servername (title)

and you should then only need to enter "The desired title" in the
resulting field.

THe wikiform will wrap this in a (:title ... :) directive and unwrap
it when you edit the page. At least, that's what is supposed to happen.

Your response suggests that you are entering a title directive,
rather than the title text and letting wikiform generate the
directive.

If I get time over the next few days, I'll set up a test.

> 
>the wiki this is intended for is behind a corporate firewall
>(so unable to show you an example) but i can recreate a test
>form if you wish although it does reoccur when i test this outside the work servers.
> 
>ta
> 
>david
> 
>
>
>*bump*
>hello i'm trying to use wikiform and formtitle with [[?title]]
>to refer to an entry, for example, in the form of
>http://mydomain/index.php?n=Main.Abc123?title=Servername this
>displays the entry for 'Servername' which resides, for example
>on Main.00050. the above url shows the entry 
>for 'Servername' in a table with a url to click to access more
>information on that subject.a question has been asked whether
>it would be possible to expand the url to not show the server
>in a tablebut to go directly to the content held on Main.00050.
>so is there a way to expand the url to take the user directly
>to the page (preferably in view mode)? i've searched but none
>of the page actions appear to work. is there a page action of
>expand (for example?) so the above url would be in the form of
>http://mydomain/index.php?n=Main.Abc123?title=Servername?action=expand
>this way the user by-passes the table and goes directly to the content? 
> 
>this is needed as the user wishes to setup a script so that the
>format of the url means they only need to 
>change the name of the server when linking externally. this way
>they do not need to know the page number the
>data lives on.  

Basically, the expand action has to do what the formtitle
script does and turn title into its corresponding pagename,
then redirect pmwiki to that page. This assumes the title
corresponds to a single wiki page. So the action function
needs to be a variant on formtitle's MakeFormLink function,
that redirects to the url corresponding to the pagename
with the given title. Essentially, the return MakeLink(...)
when count($n)==1 has to become Redirect(MakePageName(...)).

You also have to deal with the cases where no entry is found 
and more than one entry is found.

Does that help at all?

>thanks for any help! david 


-- 
John Rankin
Affinity Limited
T 64 4 495 3737
F 64 4 473 7991
021 RANKIN
john.rankin at affinity.co.nz
www.affinity.co.nz





More information about the pmwiki-users mailing list