I have noticed this before, but used a workaround.
Now I saw this again when creating the Support question form + templates:
This is such a basic functionality, this should just work!
This is QuestionTemplate (just in case it gets changed)
% META:FORM{name="QuestionForm"}%
% META:FIELD{name="Subject" attributes="" title="Subject" value=""}%
% META:FIELD{name="Extension" attributes="" title="Extension" value=""}%
% META:FIELD{name="Version" attributes="" title="Version" value=""}%
% META:FIELD{name="Status" attributes="M" title="Status" value="Asked"}%
% META:PREFERENCE{name="VIEW_TEMPLATE" title="VIEW_TEMPLATE" type="Local" value="QuestionView"}%
Looks like META:PREFERENCEs don't get included in the new topic.
--
CrawfordCurrie - 14 Nov 2008 - 09:02
Do you want META:anything automatically copied - even from a template? (except in specific cases like forms, etc.) The question is, how is FW to know whether to apply that META:PREFERENCE to the template itself or also copy it to the new topic? One solution to the problem is:
% M%NOP%ETA:PREFERENCE{name="VIEW_TEMPLATE" title="VIEW_TEMPLATE" type="Local" value="QuestionView"}%
When this line gets imported from the template into the new topic, it turns into:
% META:PREFERENCE{name="VIEW_TEMPLATE" title="VIEW_TEMPLATE" type="Local" value="QuestionView"}%
and saved in the topic. I haven't tested it specifically in th instance you're indicating (not yet comfortable "playing" with other people's stuff around here), but in a mock-up I did, it looked like it should work.
If you want it to jump right to the EDIT screen, but hide the META tag (i.e., have it not appear in the edit window but be saved from the template), instead of:
<form method="post" action="%SCRIPTURL{"edit"}%/%WEB%/QuestionAUTOINC0" name="newquestion" id="newquestion">
use
<form method="post" action="%SCRIPTURL{"save"}%/%WEB%/QuestionAUTOINC0" name="newquestion" id="newquestion">
<input type="hidden" name="templatetopic" value="QuestionTemplate">
<input type="hidden" name="action_checkpoint" value="1" />
--
MatthewDent - 25 Nov 2008
Good analysis. The NOP solution of course only works if you have manual edit access to the topic. If meta is stored in a DB, it's won't be that easy.
What you actually want in this case is some way of saying "when a topic based on this topic is created, include this meta-data" - and you want to say it in a way that won't interfere with database storage of the meta-data for the template topic. Something like Matthew proposes, but a bit more elegant
Note that the meta preference is declared above a Local. I don't think that has anything to do with it's transfer to derived topics, but it might suggest another approach.
This is not Urgent, and really needs a feature request. Lowered to Normal.
--
CrawfordCurrie - 28 Nov 2008
By
Item8873, META:PREFERENCE does get transferred now, so closing this.
--
CrawfordCurrie - 06 Jun 2010