Feature Proposals » VIEW_TEMPLATE and EDIT_TEMPLATE variables to be made dynamic

Summary

Current State: Developer: Reason: Date: Concerns By: Bug Tracking: Proposed For:
MergedToCore HideyoImazu AcceptedByReleaseMeeting 2016年02月17日 TWikibug:Item7729 KampalaRelease

Edit Form

CurrentState:
ReasonForDecision:
DateOfCommitment: Format: YYYY-MM-DD
ProposedFor:

Motivation

It's handy if VIEW_TEMPLATE value can be determined dynamically.

Description and Documentation

If VIEW_TEMPLATE value has variables, they are expanded. By the same token, EDIT_TEMPLATE value has its variables expanded. This is for consistency as well as convenience.

Examples

 * Set VIEW_TEMPLATE = %IF{"'%CALCULATE{$SUBSTRING(%TOPIC%, 1, 4)}%' = 'Item'" then="ItemViewTmpl"}%
 * Set EDIT_TEMPLATE = %IF{"'%CALCULATE{$SUBSTRING(%TOPIC%, 1, 4)}%' = 'Item'" then="editform"}%

Impact

WhatDoesItAffect: Rendering

Implementation

TWiki::UI::View::view() will be enhanced so that VIEW_TEMPLATE value is processed with TWiki::handleCommonTags().

-- Contributors: Hideyo Imazu - 2016年02月16日

Discussion

Proposal looks good. For performance I recommend testing for %[A-Z] before calling TWiki::handleCommonTags().

-- Peter Thoeny - 2016年02月17日

I take your advice, Peter.

-- Hideyo Imazu - 2016年02月18日

This proposal is accepted by KampalaReleaseMeeting2016x02x18

-- Peter Thoeny - 2016年02月21日

I've realized that EDIT_TEMPLATE needs to be treated in the same manner as VIEW_TEMPLATE for consistency, which is now reflected on the Description and Examples above.

-- Hideyo Imazu - 2016年02月29日

Edit | Attach | (削除) Watch (削除ここまで) | Print version | History : r8 < r7 < r6 < r5 < r4 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r8 - 2016年02月29日 - HideyoImazu
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.

AltStyle によって変換されたページ (->オリジナル) /