How Extensions work

The myShop extensions which make it possible to display product information in your own custom layout are generally noted within the style attribute of a XHTML element. You can see the use of the style attribute for including myShop extension in the example below.

In this example the content of the <span> element is replaced by the value of the column named (first row) ‘title’ (myshop-value:title) of the excel.

<span style="myshop-value:title;">
    here comes the value of the column named title
</span>

Every myShop extension starts with the frase ‘myshop-’ followed by one of the extensions (for a complete list of available extensions, see the Referencelist).

When using myShop extensions you are not limited to only the element. You can use any element you wish, in the next example a table is used for displaying the title of a column (note that we’re using a column number instead of name) and the value of a row.

<table border="0">
        <tr>
                <td style="myshop-label:1">
                        Here comes the title of column 1
                </td>
                <td style="myshop-value:1; font-size:10; font-weight:bold">
                        Here comes the value of column 1 row n
                </td>
        </tr>
<table>

In this example the first cell of the table will be replaced by the title of the first column from the excel (myshop-label:1). The second cell will contain the value of that column (for the ‘current’ product). The second cell also shows that myshop- extensions can be combined with other style directives (e.g. style="myshop-value:1; font-size:10; font-weight:bold;").

Feedback

Was this helpful?

Yes No
You indicated this topic was not helpful to you ...
Could you please leave a comment telling us why? Thank you!
Thanks for your feedback.

Post your comment on this topic.

Post Comment