Recent Changes - Search:

PmWiki

pmwiki.org

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

SelectPageSpaced


Problem

When you populate an input select with page link values it only works if you use a non-spaced link aliases. If you try to use spacing, generated by the page variables $Namespaced or $Titlespaced the spacing breaks the displayed input values (by causing the closing link markup ]]to display)

Solved

If the returned value will have spaces then you need to enclose in quotations the underlying value argument (variable) even if that entered value does not, itself, have any spaces.

Sample input select boxes

Select Name (ok)

Select Name Spaced (broken)

Select Name Spaced (fixed with quotes)

Select Title Spaced (broken)

Select Title Spaced (fixed with quotes)

Templates used for test

[[#selectname]]
(:template each:)(:input select pagelink [[{=$FullName}|{=$Name}]] "{=$Titlespaced}":)
(:template last:)(:input submit post Ok:)
[[#selectnameend]]

[[#selectnamespaced]]
(:template each:)(:input select pagelink [[{=$FullName}|{=$Namespaced}]]  "{=$Titlespaced}":)
(:template last:)(:input submit post Ok:)
[[#selectnamespacedend]]

[[#selectnamespacedfixed]]
(:template each:)(:input select pagelink "[[{=$FullName}|{=$Namespaced}]]"  "{=$Titlespaced}":)
(:template last:)(:input submit post Ok:)
[[#selectnamespacedfixedend]]

[[#selecttitlespaced]]
(:template each:)(:input select pagelink [[{=$FullName}|{=$Titlespaced}]]  "{=$Titlespaced}":)
(:template last:)(:input submit post Ok:)
[[#selecttitlespacedend]]

[[#selecttitlespacedfixed]]
(:template each:)(:input select pagelink "[[{=$FullName}|{=$Titlespaced}]]"  "{=$Titlespaced}":)
(:template last:)(:input submit post Ok:)
[[#selecttitlespacedfixedend]]

Edit - History - Print - Recent Changes - Search
Page last modified on September 10, 2011, at 12:03 PM
  0: 00.00 00.00 config start
  1: 00.00 00.00 config end
  2: 00.06 00.05 MarkupToHTML begin
  3: 00.08 00.07 FPLTemplate: Chain begin
  4: 00.08 00.07 FPLTemplate: FPLTemplateLoad
  5: 00.08 00.07 FPLTemplate: FPLTemplateDefaults
  6: 00.08 00.07 FPLTemplate: FPLTemplatePageList
  7: 00.08 00.07 MakePageList pre
  8: 00.08 00.08 PageListSources begin
  9: 00.08 00.08 PageStore::ls begin wiki.d/{$FullName}
 10: 00.12 00.11 PageStore::ls merge wiki.d/{$FullName}
 11: 00.15 00.14 PageStore::ls end wiki.d/{$FullName}
 12: 00.16 00.14 PageStore::ls begin $FarmD/wikilib.d/{$FullName}
 13: 00.16 00.14 PageStore::ls merge $FarmD/wikilib.d/{$FullName}
 14: 00.16 00.14 PageStore::ls end $FarmD/wikilib.d/{$FullName}
 15: 00.16 00.14 PageListSources end count=1006
 16: 00.16 00.14 PageListSort pre ret=4 order=name
 17: 00.16 00.14 MakePageList items count=1006, filters=
 18: 00.17 00.16 MakePageList post count=1006, readc=0
 19: 00.17 00.16 PageListCache begin save key=473bd943b95d3e5ab5e9edc6794a8eac
 20: 00.17 00.16 PageListCache end save
 21: 00.17 00.16 PageListSort begin
 22: 00.17 00.16 PageListSort sort
 23: 00.22 00.20 PageListSort end
 24: 00.22 00.20 MakePageList end
 25: 00.22 00.21 FPLTemplate: FPLTemplateSliceList
 26: 00.22 00.21 FPLTemplate: FPLTemplateFormat
 27: 00.24 00.22 MarkupToHTML begin
 28: 00.26 00.24 MarkupToHTML end
 29: 00.26 00.24 FPLTemplate: Chain end
 30: 00.26 00.24 FPLTemplate: Chain begin
 31: 00.26 00.24 FPLTemplate: FPLTemplateLoad
 32: 00.26 00.24 FPLTemplate: FPLTemplateDefaults
 33: 00.26 00.24 FPLTemplate: FPLTemplatePageList
 34: 00.26 00.24 MakePageList pre
 35: 00.26 00.24 PageListSources begin
 36: 00.26 00.24 PageStore::ls begin wiki.d/{$FullName}
 37: 00.30 00.27 PageStore::ls merge wiki.d/{$FullName}
 38: 00.33 00.30 PageStore::ls end wiki.d/{$FullName}
 39: 00.33 00.31 PageStore::ls begin $FarmD/wikilib.d/{$FullName}
 40: 00.33 00.31 PageStore::ls merge $FarmD/wikilib.d/{$FullName}
 41: 00.33 00.31 PageStore::ls end $FarmD/wikilib.d/{$FullName}
 42: 00.34 00.31 PageListSources end count=1006
 43: 00.34 00.31 PageListSort pre ret=4 order=name
 44: 00.34 00.31 MakePageList items count=1006, filters=
 45: 00.35 00.32 MakePageList post count=1006, readc=0
 46: 00.35 00.32 PageListCache begin save key=97c6c323ca606e0f0aa424eb02460b66
 47: 00.35 00.32 PageListCache end save
 48: 00.35 00.33 PageListSort begin
 49: 00.35 00.33 PageListSort sort
 50: 00.40 00.37 PageListSort end
 51: 00.40 00.37 MakePageList end
 52: 00.40 00.38 FPLTemplate: FPLTemplateSliceList
 53: 00.40 00.38 FPLTemplate: FPLTemplateFormat
 54: 00.42 00.39 MarkupToHTML begin
 55: 00.43 00.41 MarkupToHTML end
 56: 00.43 00.41 FPLTemplate: Chain end
 57: 00.43 00.41 FPLTemplate: Chain begin
 58: 00.43 00.41 FPLTemplate: FPLTemplateLoad
 59: 00.43 00.41 FPLTemplate: FPLTemplateDefaults
 60: 00.43 00.41 FPLTemplate: FPLTemplatePageList
 61: 00.43 00.41 MakePageList pre
 62: 00.43 00.41 PageListSources begin
 63: 00.43 00.41 PageStore::ls begin wiki.d/{$FullName}
 64: 00.47 00.44 PageStore::ls merge wiki.d/{$FullName}
 65: 00.51 00.47 PageStore::ls end wiki.d/{$FullName}
 66: 00.51 00.48 PageStore::ls begin $FarmD/wikilib.d/{$FullName}
 67: 00.51 00.48 PageStore::ls merge $FarmD/wikilib.d/{$FullName}
 68: 00.51 00.48 PageStore::ls end $FarmD/wikilib.d/{$FullName}
 69: 00.52 00.48 PageListSources end count=1006
 70: 00.52 00.48 PageListSort pre ret=4 order=name
 71: 00.52 00.48 MakePageList items count=1006, filters=
 72: 00.53 00.49 MakePageList post count=1006, readc=0
 73: 00.53 00.49 PageListCache begin save key=9c70cdee9afe3c1d2377b044b15cfc37
 74: 00.53 00.50 PageListCache end save
 75: 00.53 00.50 PageListSort begin
 76: 00.53 00.50 PageListSort sort
 77: 00.59 00.55 PageListSort end
 78: 00.59 00.55 MakePageList end
 79: 00.59 00.56 FPLTemplate: FPLTemplateSliceList
 80: 00.59 00.56 FPLTemplate: FPLTemplateFormat
 81: 00.61 00.57 MarkupToHTML begin
 82: 00.62 00.58 MarkupToHTML end
 83: 00.62 00.58 FPLTemplate: Chain end
 84: 00.62 00.59 FPLTemplate: Chain begin
 85: 00.62 00.59 FPLTemplate: FPLTemplateLoad
 86: 00.62 00.59 FPLTemplate: FPLTemplateDefaults
 87: 00.62 00.59 FPLTemplate: FPLTemplatePageList
 88: 00.62 00.59 MakePageList pre
 89: 00.63 00.59 PageListSources begin
 90: 00.63 00.59 PageStore::ls begin wiki.d/{$FullName}
 91: 00.67 00.62 PageStore::ls merge wiki.d/{$FullName}
 92: 00.70 00.65 PageStore::ls end wiki.d/{$FullName}
 93: 00.70 00.66 PageStore::ls begin $FarmD/wikilib.d/{$FullName}
 94: 00.70 00.66 PageStore::ls merge $FarmD/wikilib.d/{$FullName}
 95: 00.70 00.66 PageStore::ls end $FarmD/wikilib.d/{$FullName}
 96: 00.71 00.66 PageListSources end count=1006
 97: 00.71 00.66 PageListSort pre ret=4 order=name
 98: 00.71 00.66 MakePageList items count=1006, filters=
 99: 00.72 00.68 MakePageList post count=1006, readc=0
100: 00.72 00.68 PageListCache begin save key=b090d2ba9744b6cb0689dca8f9588969
101: 00.72 00.68 PageListCache end save
102: 00.72 00.68 PageListSort begin
103: 00.72 00.68 PageListSort sort
104: 00.78 00.74 PageListSort end
105: 00.78 00.74 MakePageList end
106: 00.78 00.74 FPLTemplate: FPLTemplateSliceList
107: 00.79 00.74 FPLTemplate: FPLTemplateFormat
108: 00.80 00.75 MarkupToHTML begin
109: 00.81 00.77 MarkupToHTML end
110: 00.81 00.77 FPLTemplate: Chain end
111: 00.81 00.77 FPLTemplate: Chain begin
112: 00.81 00.77 FPLTemplate: FPLTemplateLoad
113: 00.81 00.77 FPLTemplate: FPLTemplateDefaults
114: 00.81 00.77 FPLTemplate: FPLTemplatePageList
115: 00.81 00.77 MakePageList pre
116: 00.91 00.77 PageListSources begin
117: 00.92 00.77 PageStore::ls begin wiki.d/{$FullName}
118: 00.96 00.80 PageStore::ls merge wiki.d/{$FullName}
119: 00.99 00.84 PageStore::ls end wiki.d/{$FullName}
120: 00.99 00.84 PageStore::ls begin $FarmD/wikilib.d/{$FullName}
121: 00.99 00.84 PageStore::ls merge $FarmD/wikilib.d/{$FullName}
122: 01.00 00.84 PageStore::ls end $FarmD/wikilib.d/{$FullName}
123: 01.00 00.84 PageListSources end count=1006
124: 01.00 00.85 PageListSort pre ret=4 order=name
125: 01.00 00.85 MakePageList items count=1006, filters=
126: 01.01 00.86 MakePageList post count=1006, readc=0
127: 01.01 00.86 PageListCache begin save key=3a345ced98e414f12dceeeee13a866c5
128: 01.01 00.86 PageListCache end save
129: 01.01 00.86 PageListSort begin
130: 01.01 00.86 PageListSort sort
131: 01.07 00.92 PageListSort end
132: 01.07 00.92 MakePageList end
133: 01.07 00.92 FPLTemplate: FPLTemplateSliceList
134: 01.07 00.92 FPLTemplate: FPLTemplateFormat
135: 01.09 00.93 MarkupToHTML begin
136: 01.10 00.94 MarkupToHTML end
137: 01.10 00.94 FPLTemplate: Chain end
138: 01.10 00.95 MarkupToHTML end
139: 01.11 00.96 MarkupToHTML begin
140: 01.14 00.98 ReadApprovedUrls SiteAdmin.ApprovedUrls begin
141: 01.15 00.99 ReadApprovedUrls SiteAdmin.ApprovedUrls end
142: 01.16 01.01 MarkupToHTML end
143: 01.16 01.01 MarkupToHTML begin
144: 01.18 01.02 MarkupToHTML end
145: 01.18 01.03 now