Loading...
 
Architecture / Installation

Architecture / Installation


[SOLVED] Custom Module: "Syntax error: unknown tag 'img"

posts: 9 France

Hi all,

I have an issue and I don't know if it is a bug or a problem inherent to Tiki 26:
if I create a Custom Module, and if I want to insert an image from the Gallery Files, I get the following error:

Copy to clipboard
'Syntax error in: "{img type="fileId" fileId="8" sizes="32px" alt="Test"} "unknown tag 'img''


And I can't save the module because of this error.
I have try with other syntaxes, but it's return all the time the unknown tag 'img

Does someone know why this error is return? And eventually how to add an image in Custom Module?...

posts: 9 France
So, I guess I understand why we can't add
Copy to clipboard
{img}
syntaxe directly in a module, as it seems it creates a Smarty Compiler fatal error...


But in this case, the question is how to add an image inside a Custom Module ?...


posts: 8633 Israel
Guillaume wrote:
Copy to clipboard
'Syntax error in: "{img type="fileId" fileId="8" sizes="32px" alt="Test"} "unknown tag 'img''


I think something is wrong in the sizes parameter your set (never used it yet)

Tooltip for the Sizes parameter;
Comma-separated sizes (in vw, em, px) for the image in xs, sm, md, and lg layouts. Must be 4 parameters.

posts: 9 France
Bernard Sfez / Tiki Specialist wrote:

I think something is wrong in the sizes parameter your set (never used it yet)

Tooltip for the Sizes parameter;
Comma-separated sizes (in vw, em, px) for the image in xs, sm, md, and lg layouts. Must be 4 parameters.


Hello Bernard,
thanks to care!

I tried with different parameters, but nothing is working, even if I only let as parameters:
Copy to clipboard
{img type="fileId" img fileId="8" }

The only way I found to at least not get a syntax error is to add
Copy to clipboard
{literal}...{/literal}

But this only show the code img type="fileId" img fileId="8" on the page but not display the image...

Will continue to looking further...


posts: 8633 Israel

Did you try simply to use html in your custom module ?

Copy to clipboard
<img src="display8">
posts: 9 France
Bernard Sfez / Tiki Specialist wrote:

Did you try simply to use html in your custom module ?

Copy to clipboard


You're right!
I was silly to not think about it... rolleyes
Thanks a lot Bernard ! biggrin