Fork me on GitHub

Pagemaster - redirect from input-Form  Bottom

  • Is there a possibility to call another template after editing a pubtype with the pubedit_input_template? At the moment it calls the standard template, but I wish to call the template_2 after update.
  • I guess that something like this is done with the goto=stepmode,
    unfortunately I'm not realy sure how it works but I guess that there are needed additional workflow states to jump through while editing.

    I don't know if in the initial german documentation of the module Marco added some hints about the stepmode feature, but I'll need to play with it before the release of Clip 0.9

    --
    - Mateo T. -
    Mis principios... son mis fines
  • You can try to add goto in operation file /modules/pagemaster/workflows/operations

    Code

    $result = array('goto' => pnModURL('PageMaster', 'user', 'viewpub',
                                                       array('tid' => $pub['tid'],
                                                             'pid' => $pub['core_pid'],
                                                             'template' => 'pending')));
                }


    You may want to have separate operation files for diff pub types same as workflows

    hmm you can try step mode template so it fit to this

    Code

    // resolve the template to use
        $alert = SecurityUtil::checkPermission('pagemaster::', '::', ACCESS_ADMIN) && pnModGetVar('PageMaster', 'devmode', false);

        // individual step
        $template_step = 'input/pubedit_'.$pubtype['formname'].'_'.$stepname.'.htm';

        if (!empty($stepname) && $render->template_exists($template_step)) {
            return $render->pnFormExecute($template_step, $formHandler);
        } elseif ($alert) {
            LogUtil::registerStatus(__f('Notice: Template [%s] not found.', $template_step, $dom));
        }

        // generic edit
        $template_all = 'input/pubedit_'.$pubtype['formname'].'_all.htm';

        if ($render->template_exists($template_all)) {
            return $render->pnFormExecute($template_all, $formHandler);
        } elseif ($alert) {
            LogUtil::registerStatus(__f('Notice: Template [%s] not found.', $template_all, $dom));
        }

        // autogenerated edit template
        $render->force_compile = true;
        $render->assign('editpub_template_code', PMgen_editpub_tplcode($tid));

        return $render->pnFormExecute('var:editpub_template_code', $formHandler);



    heh edit pub func don't support "standard" template override... like template=xxx



    Edited by Kaik on Jan 14, 2011 - 08:08 AM.

    --
    rgfdgafgaf
  • Indeed
    no overrides but steps or workflow states :)

    --
    - Mateo T. -
    Mis principios... son mis fines

This list is based on users active over the last 60 minutes.