/[pub]/suikawiki/script/misc/plugins/link/ns.wp2
Suika

Contents of /suikawiki/script/misc/plugins/link/ns.wp2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Thu Apr 1 04:39:58 2004 UTC (21 years, 3 months ago) by wakaba
Branch: MAIN
CVS Tags: suikawiki3-redirect, release-3-0-0, HEAD
Branch point for: paragraph-200404, helowiki, helowiki-2005
Changes since 1.1: +17 -4 lines
New m--change mode implemented

1 #?SuikaWikiConfig/2.0
2
3 Plugin:
4 @Name: WikiNamespace
5 @Description:
6 @@@:
7 Namespaced WikiName properties
8 @@lang:en
9 @License: %%Perl%%
10 @Author:
11 @@Name:
12 @@@@: Wakaba
13 @@@lang:ja
14 @@@script:Latn
15 @@Mail[list]: w@suika.fam.cx
16 @Date.RCS:
17 $Date: 2004/02/08 08:47:02 $
18 @RequiredPlugin[list]:
19 HTML
20
21 FormattingRule:
22 @Category[list]:
23 form-input
24 view
25 view-resource
26 @Name: ns-short-page-name
27 @Description:
28 @@@: Last component of WikiName
29 @@lang: en
30 @Parameter:
31 @@Name: page
32 @@Type: WikiName
33 @@Default: (auto)
34 @@Description:
35 @@@@:
36 WikiName
37 @@@lang: en
38 @Formatting:
39 my $name = $o->{wiki}->name ($p->{name} || $o->{wiki}->{var}->{page});
40 $p->{-parent}->append_text ($name->[-1]);
41
42 FormattingRule:
43 @Category[list]:
44 page-link
45 @Name: ns-short-page-name
46 @Description:
47 @@@: Last component of WikiName
48 @@lang: en
49 @Parameter:
50 @@Name: page
51 @@Type: WikiName
52 @@Default: (auto)
53 @@Description:
54 @@@@:
55 WikiName
56 @@@lang: en
57 @Formatting:
58 my $name = $o->{wiki}->name ($p->{name} || $o->{link}->{dest}->{page_name});
59 $p->{-parent}->append_text ($name->[-1]);
60
61 FormattingRule:
62 @Category[list]:
63 form-input
64 view
65 view-resource
66 @Name: ns-page-path-name
67 @Description:
68 @@@: WikiName without last component
69 @Formatting:
70 my $name = $o->{wiki}->name ($p->{name} || $o->{wiki}->{var}->{page});
71 $p->{-parent}->append_text ($o->{wiki}->name ([@$name[0..$#$name-1]])
72 ->stringify (wiki => $o->{wiki}));
73
74 FormattingRule:
75 @Category[list]:
76 page-link
77 @Name: ns-page-path-name
78 @Description:
79 @@@: WikiName without last component
80 @Formatting:
81 my $name = $o->{wiki}->name ($p->{name} || $o->{link}->{dest}->{page_name});
82 $p->{-parent}->append_text ($o->{wiki}->name ([@$name[0..$#$name-1]])
83 ->stringify (wiki => $o->{wiki}));
84
85 FormattingRule:
86 @Category[list]:
87 form-input
88 view
89 view-resource
90 link-to-wikipage
91 @Name: is-child-of-root-ns
92 @Description:
93 @@@: Conditional content, whether "parent" page exists or not
94 @@lang: en
95 @Parameter:
96 @@Name: false
97 @@Type: CDATA
98 @@Default: (none)
99 @@Description:
100 @@@@: Evaluated if "parent" page does not exist
101 @@@lang: en
102 @Parameter:
103 @@Name: page
104 @@Type: WikiName
105 @@Default: (auto)
106 @@Description:
107 @@@@: WikiPage name
108 @@@lang: en
109 @Parameter:
110 @@Name: true
111 @@Type: CDATA
112 @@Default: (none)
113 @@Description:
114 @@@@: Evaluated if "parent" page exists
115 @@@lang: en
116 @Formatting:
117 my $name = $o->{wiki}->name ($p->{name} || $o->{wiki}->{var}->{page});
118 if (@$name == 1) {
119 __ATTRNODE:%true->{$p->{-parent}}__;
120 } else {
121 __ATTRNODE:%false->{$p->{-parent}}__;
122 }
123
124 FormattingRule:
125 @Category[list]:
126 page-link
127 @Name: is-child-of-root-ns
128 @Description:
129 @@@: Conditional content, whether "parent" page exists or not
130 @@lang: en
131 @Parameter:
132 @@Name: false
133 @@Type: CDATA
134 @@Default: (none)
135 @@Description:
136 @@@@: Evaluated if "parent" page does not exist
137 @@@lang: en
138 @Parameter:
139 @@Name: page
140 @@Type: WikiName
141 @@Default: (auto)
142 @@Description:
143 @@@@: WikiPage name
144 @@@lang: en
145 @Parameter:
146 @@Name: true
147 @@Type: CDATA
148 @@Default: (none)
149 @@Description:
150 @@@@: Evaluated if "parent" page exists
151 @@@lang: en
152 @Formatting:
153 my $name = $o->{wiki}->name ($p->{name} || $o->{link}->{dest}->{page_name});
154 if (@$name == 1) {
155 __ATTRNODE:%true->{$p->{-parent}}__;
156 } else {
157 __ATTRNODE:%false->{$p->{-parent}}__;
158 }
159
160 FormattingRule:
161 @Category[list]:
162 view
163 view-resource
164 form-input
165 page-link
166 link-to-resource
167 @Name: ns--root-wikiname
168 @Description:
169 @@@:
170 Text representation of "root" WikiPage name
171 @@lang: en
172 @Formatting:
173 $p->{-parent}->append_text ($o->{wiki}->{config}->{name}->{space}->{root});
174
175 ViewFragment:
176 @Name: links
177 @Formatting:
178 %link-wiki (
179 page => {%ns-page-path-name;}p,
180 rel => {up},
181 description => {%res (name => {WikiNS:GoToParent:Description});}p,
182 );
183
184 Resource:
185 @WikiNS:GoToParent:Description:
186 @@@:
187 Parent WikiPage, "%ns-page-path-name;"
188 @@lang: en
189
190

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24