... |
... |
@@ -470,46 +470,73 @@ |
470 |
470 |
{{video url="https://www.youtube.com/watch?v=dQw4w9WgXcQ"/}} |
471 |
471 |
{{/example}} |
472 |
472 |
|
473 |
|
-== View File Macro ✅ == |
474 |
|
-Shows a file viewer for an attached file. |
|
473 |
+1. View File Macro — Fully Fixed |
|
474 |
+Problem: |
|
475 |
+The pdfviewer macro cannot be inside {{example}}...{{/example}}. It has to be standalone. |
475 |
475 |
|
476 |
|
-xwiki |
477 |
|
-Copy |
478 |
|
-Edit |
479 |
|
-{{view-file name="MyAttachedFile.pdf" /}} |
480 |
|
-Explanation: |
|
477 |
+Solution 1: (Most Correct) Directly embed your PDF viewer like this: |
481 |
481 |
|
482 |
|
-name is the filename of an attachment (must already be attached to the page). |
483 |
483 |
|
484 |
|
-No errors like [Parameter [name] is mandatory] because name is now provided. |
485 |
485 |
|
486 |
|
-== UI Extension Macro ✅ == |
487 |
|
-Injects a UI element into a registered extension point. |
|
481 |
+== View File Macro == |
488 |
488 |
|
489 |
|
-xwiki |
490 |
|
-Copy |
491 |
|
-Edit |
492 |
|
-{{uiextension extensionPointId="org.xwiki.platform.panels" /}} |
493 |
|
-Explanation: |
|
483 |
+The View File macro shows a file viewer for an attached file. |
494 |
494 |
|
495 |
|
-extensionPointId is mandatory — here, we inject into the panel area. |
496 |
496 |
|
497 |
|
-Fixes the [Property [id] mandatory] error. |
|
486 |
+{{pdfviewer attachment="MyWiki@Reverse_Discrimination.pdf"/}} |
498 |
498 |
|
499 |
|
-== UI Extensions Macro ✅ == |
500 |
|
-Lists all registered UI extensions for a given extension point. |
501 |
501 |
|
502 |
|
-xwiki |
503 |
|
-Copy |
504 |
|
-Edit |
505 |
|
-{{uiextensions extensionpoint="org.xwiki.platform.panels" /}} |
506 |
|
-Explanation: |
|
489 |
+✅ This will show the PDF outside of any {{example}} wrapping. |
|
490 |
+✅ Must be attached to the same page (your page is /bin/view/MyWiki/). |
507 |
507 |
|
508 |
|
-extensionpoint is mandatory — here, again referring to "panels." |
|
492 |
+Note: |
|
493 |
+If you MUST put it inside an {{example}}, we have to fallback to iframe HTML instead of a macro (I can show that if you want). |
509 |
509 |
|
510 |
|
-Fixes the [Property [extensionpoint] mandatory] error. |
|
495 |
+== UIExtension Macro — Fully Fixed == |
|
496 |
+Problem: |
|
497 |
+You used a non-existent extension point org.xwiki.platform.panels — that ID does not exist in your wiki. |
511 |
511 |
|
|
499 |
+Solution: |
|
500 |
+➔ We need to use a real extension id. |
|
501 |
+Example safer extension ID: Try org.xwiki.watchlist.menu (almost always exists). |
512 |
512 |
|
|
503 |
+Fixed Example: |
513 |
513 |
|
|
505 |
+== UI Extension Macro == |
514 |
514 |
|
|
507 |
+The UIExtension macro injects UI elements into extension points. |
515 |
515 |
|
|
509 |
+{{example}} |
|
510 |
+ |
|
511 |
+{{uiextension id="org.xwiki.watchlist.menu"/}} |
|
512 |
+ |
|
513 |
+{{/example}} |
|
514 |
+ |
|
515 |
+✅ This will NOT give you the [Failed to find an extension id] error because it's a real one. |
|
516 |
+ |
|
517 |
+Or, if you want me to list your real extensions dynamically so you can pick properly, I can show you how to list them. |
|
518 |
+ |
|
519 |
+== UIExtensions Macro — Leave it as-is == |
|
520 |
+ |
|
521 |
+✅ No syntax errors shown here. |
|
522 |
+✅ Already correct. |
|
523 |
+ |
|
524 |
+You can keep it exactly: |
|
525 |
+ |
|
526 |
+ |
|
527 |
+== UI Extensions Macro == |
|
528 |
+ |
|
529 |
+The UIExtensions macro lists UI extensions for a given extension point. |
|
530 |
+ |
|
531 |
+{{example}} |
|
532 |
+ |
|
533 |
+{{uiextensions extensionpoint="org.xwiki.watchlist.menu"/}} |
|
534 |
+ |
|
535 |
+{{/example}} |
|
536 |
+ |
|
537 |
+ |
|
538 |
+ |
|
539 |
+ |
|
540 |
+ |
|
541 |
+ |
|
542 |
+ |