[pmwiki-users] Wikiforms and templates (SameerKumar):pmwiki-users Digest, Vol 25, Issue 59
skumar at eharch.com
Thu Jul 26 01:32:31 CDT 2007
>Thanks for your word, John.
>In my understanding, if I use a large text field, I then cannot
>apply standard wiki markup to format the text within the field.
>Is that correct? If so, that would be a major problem.
No, that is not correct. All regular wiki markup will work normally.
The only constraint is that the first line is treated as part of the
":term:definition" wiki syntax, so cannot start with line markup
like *#!. If the first line really, really has to be a heading or a
list item, we could probably figure out a way to do that, eg by
writing in the field:
%comment%Ignore this line%%
!!I want to start with a heading
[SK] I get it.[SK]
>I have two questions:
>1. Other than ViewTemplate, is there another method that
>can make use of the :term:definition markup that the Wikiform
>creates? GroupHeader does not seem to work with it, for example.
Let me explain what wikiforms does. When you edit a page via the
page form, it bypasses the regular PmWiki HandleEdit function
to operate on the page contents via the FormTemplate. In the same
way, when you view a page through a ViewTemplate, it appllies
the template before giving the content to PmWiki's HandleBrowse
function. In both cases, the group header and footer pages are
wrapped around the page afterwards.
The group headers and footers are not part of the page, so the
wikiform edit and view templates don't process them. The view
template uses the FormTemplate to take the page apart, so it
is not obvious how it could take account of what is in the
group header or footer.
When you say "GroupHeader does not seem to work with it"
could you explain what happens and what you would like to
[SK] When I use the ViewTemplate, to fill in the variables, I use the <detail> markup which automatically reads from the :term:definition markup. When I use the same table in the GroupHeader page, it does not fill in/resolve the <detail> tags .
>2. Can the Wikiform data be saved on a separate
>Group.Page.table page which then is 56;(:include:)-ed57; in
>the Group.Page? Would that also be complicated since I am also
>using the formtitle recipe to not have to live with the numbered titles?
Yes, I have done this when I wanted to have 2 forms for 2 different
parts of the page. The form title recipe adds a further complication,
of course, but I think there are a couple of options. The challenge
is making automatic links between the pages pairs.
1. form data in one group, normal wiki data in another group
2. form data and normal wiki data in the same group
In both cases, the general approach is the same: use the title
of the form-based pages as the name of the regular pages. That
way, you can automatically generate links between them.
I think on the whole that it will be easier to put the pages into
separate groups, because then you can use a GroupFooter to
specify the include.
I think you will need some extra code to generate the include,
to translate the name of the current page in the wiki-based
group into the number of the corresponding page in the form-based
group, and then to include it.
I hope that makes sense -- if you decide on this approach, let
me know and I'll try to spell it out in more detail. The short
answer is that it can be done.
[SK] I would surely like to follow this approach... I will be grateful if you could please help me out with this. Please bear in mind that I am not a programmer and have negligible experience with PHP. But I follow instructions quite well.
>Looking forward to more ideas! I truly appreciate all your help.
[SK] I am running into another problem owing to the formtitle recipe... I have just posted a question on the http://www.pmwiki.org/wiki/Cookbook/CommentPageLink-Talk at the very bottom. My "Discussion Tab" does not work as expected because the Page.Name is not the same as the Page.Title. Any ideas on that front??
| & * Wellington
pmwiki-users mailing list
pmwiki-users at pmichaud.com
More information about the pmwiki-users