Portal Engine Questions on portal engine and web parts.
Version 7.x > Portal Engine > Using Macros inside Long Text View modes: 
User avatar
Certified Developer 8
Certified Developer 8
ashish.narnoli12-gmail - 7/11/2013 5:23:23 AM
   
Using Macros inside Long Text
Hi,
I have created a Custom Table having a field called "Slide content" with "Long Text" attribute.
In order to display the table values properly, i created a Transformation for that custom table.
I have entered data in that field in HTML format and it is working fine.

I have created a other Document type for other purpose and created a text/xml type transformation.

My requirement is to display this Tranformation along with HTML formatted text which is stored inside "Custom Table".

The entered data is in below format
<div>
//--- Some HTML content
<p>
{% Transformations["cla.inspiration.inspirationslide"] @%}
</p>
</div>

After rendering the page, it shows as:

{% Transformations["cla.inspiration.inspirationslide"] @%}

What to do to display that transformation properly?

I am using v7.0.37

Regards!
Ashish Narnoli

User avatar
Member
Member
kentico_sandroj - 7/11/2013 8:06:25 PM
   
RE:Using Macros inside Long Text
Hi Ashish,

May I ask how the document type relates to the custom table?

Also, what is the purpose of the macro?

Aditionally, you should reference table fields in the transformation and not the table name.

You can reference a column which contains HTML values without any issues.

Which Web parts are you using?

Regards,
Sandro

User avatar
Certified Developer 8
Certified Developer 8
ashish.narnoli12-gmail - 7/12/2013 5:12:54 AM
   
RE:Using Macros inside Long Text
Hi Sandro,

Thanks for your reply. It seems that my requirement requires more clarification :)

There is no relation between custom table and document type. They are separate from each other.

I just want to show the Document type transformation using Macros within Custom table transformation.

Actually i have created a Document type having a Text/Xml transformation which is already well used some where in the project while using as Macros in Editable Text webpart.

As i already mention, the Custom table having a Column named "Slide content" with "Long Text" attribute. In this "Slide content" column, I generally entered any HTML block (having Custom table Column name) which is well rendered on the page.

But in a special situation i need to Store HTML block having "Text/Xml transformation" of a Document type (which is mentioned above) which will rendered along with the Custom Table transformation.

Thanks!
Ashish Narnoli

User avatar
Member
Member
kentico_sandroj - 7/12/2013 8:03:18 PM
   
RE:Using Macros inside Long Text
Hi Ashish,

Thank you for the additional clarification. Here is the documentation for applying transformations using macro expressions. I believe this will give you the answer you are looking for as far as rendering the output. However, there may be a better approach from a performance perspective for accomplishing this. If you could explain or show us the final output maybe we can suggest an alternative way of accomplishing the functionality.

Regards,
Sandro