Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

addpage with placeholders #177

Open
Juergen-aus-Zuendorf opened this issue Jun 16, 2016 · 2 comments · May be fixed by #274
Open

addpage with placeholders #177

Juergen-aus-Zuendorf opened this issue Jun 16, 2016 · 2 comments · May be fixed by #274

Comments

@Juergen-aus-Zuendorf
Copy link

Hi,

I want to use the addpage command several times and fill the filename with a placeholder called "Identnummer":

<form>
action template redaktionssystem:vorgaben:vorlage_start redaktionssystem:techn_doku:@@Funktionsbenennung@@_@@Identnummer@@

fieldset "Neue Funktionsbeschreibung"
textbox           "Funktionsbenennung"
data_aliastextbox "Maschinentyp" _fbg-mtyps
textbox           "Gültig ab Serie (Seriennummern)"
hidden            "Datatyp" "=Funktionsbeschreibung"
number            "Identnummer" 00000 ++

addpage redaktionssystem:vorgaben:vorlage_start start
addpage redaktionssystem:vorgaben:vorlage_fbg   fkt-fbg_@@Identnummer@@_a

fieldset "Neue Struktur anlegen"
submit
</form>

But the result is, that the filename of all pages which are generated by addpage contains the word "identnummer" instead of the real value, e.g. "fkt-fbg_identnummer_a"

Regards
Juergen

@mentgit
Copy link

mentgit commented Aug 24, 2016

I have the same problem. This is an error in the file actiontemplate.php. In function getAdditionalTargetpages the following lines

$relativetargetpage = $field->getParam('page_tgt');
resolve_pageid($ns, $relativeTargetPageid, $ignored);
$targetpage = "$this->pagename:$relativetargetpage";

must be replaced by

$relativetargetpage = $field->getParam('page_tgt');
$relativetargetpage = $this->replace($relativetargetpage);
resolve_pageid($ns, $relativeTargetPageid, $ignored);
$targetpage = "$this->pagename:$relativetargetpage";

Please be aware that a did not tested this change extensively.

@iainhallam
Copy link

This has just come up for me as well; addpage looks very useful, but some of that goes away if you can't use the values entered in the form to produce the page target. Would be nice if addpage could replicate the functionality given by the form itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants