| Current State: | Developer: | Reason: | Date: | Concerns By: | Bug Tracking: | Proposed For: |
|---|---|---|---|---|---|---|
| MergedToCore | PeterThoeny | AcceptedByReleaseMeeting | 2016-02-17 | TWikibug:Item7727 |
KampalaRelease |
| TopicSummary: | Enhancement to WEB Variable |
| CurrentState: | MergedToCore |
| CommittedDeveloper: | PeterThoeny |
| ReasonForDecision: | AcceptedByReleaseMeeting |
| DateOfCommitment: | 2016-02-17 |
| ConcernRaisedBy: | |
| BugTracking: | TWikibug:Item7727 |
| OutstandingIssues: | |
| RelatedTopics: | VarWEB |
| InterestedParties: | |
| ProposedFor: | KampalaRelease |
| TWikiContributors: | PeterThoeny |
%WEB{format=current"}% to get just the current webname (last element of the path). However, this is a lot to type and not very flexible. What if I want to see, e.g., two levels?
(Use case: Our home wiki has many levels of subwebs, e.g. http://wiki.cfcl.com/Projects/Access/Utiles/DS is a subweb)
Suggestion:
| Parameter: | Description: | Default: |
|---|---|---|
| number | a number from 1 to the number of webs in the path | "$web" |
%WEB% is Engineering/TechPubs/Apps: %WEB{1}% returns: Apps ; %WEB{2}% returns: TechPubs/Apps.
| Parameter: | Description: | Example: | Default: |
|---|---|---|---|
"..." orformat="..." | Format of web name. Supported tokens: • $web - the full web path, • $parents - parent webs, if any, • $current - current web without parent webs, • $last(n) - last n webs, including current one, • $top - top-level web only, • $top(n) - n top-level webs, • $item(n) - the n-th web from top • $list - comma-space delimited list of webs • $size - array size of webs | Engineering/TechPubs/Apps/Bugs Engineering/TechPubs/Apps Bugs for $current Apps/Bugs for $last(2) Engineering for $top Engineering/TechPubs for $top(2) TechPubs for $item(2) Engineering, TechPubs, Apps, Bugs 4 for $size | "$web" |
format="" parameter. I think it is better to find a way to enhance it consistently. What about this:
format="$current", or nameless parameter "$current". This works even without quotes, such as %WEB{$current}%
"$last2", "$last3", etc. Or "$last(2)", "$last(3)", etc.
$top2, $top3, etc.