Topic on Project:Support desk

Creating a Mediawiki link with HTML code as text

4
This post was hidden by 188.98.192.198 (history)
This post was hidden by 188.98.192.198 (history)
188.98.192.198 (talkcontribs)

I have created a table inside my template, using the Mediawiki programming language as explained in the documentation. In the table cells are an image and a text. Now I would like to make the whole table clickable, so that it links to a different page. To do this I use the wiki syntax and define the page, where the user should get referred. Then using the Pipe-character, I set the table code instead of a standard text.

Unfortunately, only the table gets displayed, while the source code of the Link syntax gets print out as a text. Is there a fix you can recommend me?

Here is my source code:

[[:Category:{{{1|}}} Products|
{|
|[[File:Apple.png|50px|left|link=]]
|Order our apples
|}]] 

This should be the html code it should generate:

<a href="example.com/Category:Apple_Products"
<table>
   <tbody>
       <tr>
           <td>
               <div class="floatleft">
                     <img src="http://example.com/Apple.png">
               </div>
           </td>
           <td>
                 Order our apples
           </td>
        </tr>
   </tbody>
</table>
</a>
 
121.220.16.35 (talkcontribs)

Block content is not allowed inside inline content, additionally links can't contain links, so even without the table it would never work.

Reply to "Creating a Mediawiki link with HTML code as text"