Loading...
 
Skip to main content
Features / Usability

Features / Usability


File Gallery Revamp or how to reference image by using wiki/markdown markup

posts: 49 Croatia

Hello,

I'm very excited that File Gallery Revamp is completed, hoping it can allow me to use the same/similar syntax for referencing images in my posts…

When using Markdown markup in e.g. some static site generator, the syntax is as follows:

Copy to clipboard
[alt-text](image-url)


but it does not work or I do not know how to do it.

I have uploaded file dhanvantari.png in the file gallery named "Test" and tried to reference it in a wiki page using Markdown syntax like:

Copy to clipboard
[Dhanvantari]{dhanvantari.png)


but I only get "Dhanvantari{dhanvantari.png)" rendered on a page.

In the properties of file gallery I configured it to use the following wiki markup

Copy to clipboard
{img fileId="%filename%" thumb="box"}


instead of the default one, but I get:

"Plugin not found" from "Plugin Image".

Same thing does happen in a page using Wiki markup.

However, if I use standard syntax like:

Copy to clipboard
{img fileId="1" thumb="box"}


everything is fine, but it is a bit cumbersome since I'd like to organize my media stuff in a tree-like fashion with subfolders of the file gallery representing posts, categories, topics or whatever and then being able to reference it using filename/name. (The properties field provides an opportunity to use No value assigned as well.

So, my question is whether TIki-27 does allow using Markdown syntax for referencing images and/or how to reference media by (file)name instead of fileID?


Sincerely,
Gour

posts: 4663 Japan

Hi Gour,

As far as I know, the ability to reference an image in a gallery by name hasn't been implemented yet in Tiki. I guess the file gallery revamp changes are limited to those listed on the dev page that you mentioned, and I don't see this listed there. Also, I can't reference an image by name when I test this so, apparently, it's still on the way. As Marc said in the Matrix chat, it would be good to make a specific feature request at the dev site for this.

-- Gary

posts: 49 Croatia

Hello Gary and thank you for your reply!

Gary Cunningham-Lee wrote:
As far as I know, the ability to reference an image in a gallery by name hasn't been implemented yet in Tiki. I guess the file gallery revamp changes are limited to those listed on the dev page that you mentioned, and I don't see this listed there. Also, I can't reference an image by name when I test this so, apparently, it's still on the way.


OK, I take your word...however, I was/am puzzled by the fact that in File Gallery there is an option field:

Copy to clipboard
Wiki markup to enter when image selected from "file gallery manager"


with the following help text:

Copy to clipboard
The default is "{img fileId="%fileId%" thumb="box"}") Field names will be replaced when enclosed in % chars. e.g. %fileId%, %name%, %filename%, %description% Attributes will be replaced when enclosed in % chars. e.g. %tiki.content.url% for remote file URLs


so I assumed that those other non-default options are there for a good reason?

As Marc said in the Matrix chat, it would be good to make a specific feature request at the dev site for this.


OK, I'll discuss it further in the Matrix channel...

Sincerely,
Gour