Changes for page Card Navigation

Last modified by Calvin Henderson on 2025/03/11 10:29

From version 14.49
edited by calvin_henderson
on 2024/12/18 13:22
Change comment: There is no comment for this version
To version 14.21
edited by calvin_henderson
on 2024/12/18 13:00
Change comment: There is no comment for this version

Summary

Details

XWiki.WikiMacroClass[0]
code
... ... @@ -1,25 +1,17 @@
1 1  {{velocity}}
2 2  #set($wikiRef = $doc.documentReference.getWikiReference().getName())
3 3  #set($docRef = $doc.getFullName())
4 -#set($entries = $wikimacro.content)
5 -#if("$xcontext.action" != "edit")
4 +#set($entries = $doc.getObject('XWiki.WikiMacroClass').content)
5 +$doc.getObject('WikiMacroClass')[0].getProperty('content')
6 6  
7 -
8 -$entries
9 -
10 -
11 -
12 -{{html wiki="true"}}
13 -#if (false)
14 - <div style="display: grid;
15 - grid-template-columns: 1fr 1fr 1fr;
16 - gap: 10px;
17 - ">
18 -#end
19 -
7 +#if("$xcontext.action" != "edit")
8 + {{html wiki="true"}}
9 + <div style="display: grid;
10 + grid-template-columns: 1fr 1fr 1fr;
11 + gap: 10px;
12 + ">
20 20  #foreach($entry in $entries.split('\n'))
21 21   #set($card = $entry.split('\|'))
22 - #if (false)
23 23   <a href="$card[2]" style="text-decoration:none;">
24 24   <div style="
25 25   display:grid;
... ... @@ -33,13 +33,12 @@
33 33   <h3>$card[1]</h3>
34 34   </div>
35 35   </a>
36 - #end
37 -
38 - $card[0],$card[1],$card[2]
39 39  #end
40 -## </div>
41 -{{/html}}
29 + </div>
30 + {{/html}}
31 +#end
42 42  
33 +
43 43  ----
44 44  
45 45  == Search ==
... ... @@ -46,5 +46,4 @@
46 46  
47 47  {{documentTree root="document:$wikiRef:$docRef" finder="true" limit="30"/}}
48 48  
49 -#end
50 50  {{/velocity}}