Syntax | Descrption | Memo |
---|---|---|
Link to another knowledge item | ||
pkb://knowledge/get?id=nnnn or res://pkb/knowledge/get?id=nnnn (since vserion 1.1.0) |
Link to another knowledge item by id. |
There is an easy way to generate the link: Under edit/add mode of the knowledge item. Inside content editor, right click mouse and the popup menu will be shown. Choose "Insert PKB link", then select the item(s) you want to insert. Click "Insert" button, the link will insert to the current cusor position. If you are editing/adding text type knowledge, it will insert as "pkb://knowledge/get?id=nnnn". when you view the knowledge, it is rendered as a link with the knowledge subject as label. If you are editing/adding html type knowledge, it will insert as < a href="pkb://knowledge/get?id=nnnn">name< /a >. |
pkb://knowledge/get?subject=aaa
or res://pkb/knowledge/get?subject=aaa (since vserion 1.1.0) |
Link to another knowledge item by searching subject. |
The search will be based on lucene search index on subject field. So there might be multiple items matched and the first matched item will be used.
The subject parameter should be URL encoded. |
pkb://knowledge/get?keywords=aaa
or res://pkb/knowledge/get?keywords=aaa (since vserion 1.1.0) |
Link to another knowledge item by searching keywords |
The search will be based on lucene search index on keywords field. So there might be multiple items matched and the first matched item will be used.
The keywords parameter should be URL encoded. |
pkb://knowledge/get?key=aaa
or res://pkb/knowledge/get?key=aaa (since vserion 1.1.0) |
Link to another knowledge item by searching key. |
The search will be based on lucene search index on all the fields (normal search). So there might be multiple items matched and the first matched item will be used.
The key parameter should be URL encoded. |
Link to an image relative to PKB base resource directory | ||
Tip1: By default the base directory is PKB directory. It's configurable through the preference dialog. | ||
Tip2: if you want to backup/restore your image files, you can create your own directory under pkb/data directory and place your files there.
So that when you choose from menu: File->Backup, your directory will also be zipped. When you choose File->Restore, you file will be restored. Otherwise, you need to backup by yourself. It's not recommented to place your file under the directory used by PKB, they are "data/category", "data/db" and "data/index". |
||
pkb://img/relative-image-path
or res://pkb/img/relative-image-path (since vserion 1.2.5) |
Link to an image with relative path to pkb directory. |
Sample usage: For instance, under pkb directory, create dir called "images", under "images" dir, place an image file "test.jpg" To embede the image in your knowledge, you can write: pkb://img/images/test.jpg For plain text knowledge content: IF you want to specify html attributes, you can provide it as URI parameter, for instance: To specify width and height attribute, the link will be pkb://img/images/test.jpg?width=20&height=20 Please note: If you specify "src" attribute, the path will be overwritten by your src attribute. For HTML knowledge content: Anywhere you need link to a file relative to PKB directory, you can write a link like: pkb://img/images/test.jpg Under HTML content view, all the URI parameter will be ignored. |
pkb://file/relative-image-path
or res://pkb/file/relative-image-path (since vserion 1.3.0) |
Link to a file with relative path to pkb directory. |
Sample usage: For instance, under pkb directory, create dir called "docs", under "docs" dir, place a file "test.pdf" To embede the image in your knowledge, you can write: pkb://file/docs/test.pdf For plain text knowledge content: Above URL will be translated to : < a href="path-to-test.pdf" target="_BLANK">test< /a > IF you want to specify html attributes, you can provide it as URI parameter. For HTML knowledge content: Anywhere you need link to a file relative to PKB directory, you can write a link like: pkb://file/docs/test.pdf Under HTML content view, all the URI parameter will be ignored. |