Is it possible to have a user control based macro in a content page text area that includes a template area? An example of the standard .NET code is below.
User Control:
<%@ Control Language="vb" AutoEventWireup="false" CodeBehind="ucExpand.ascx.vb" Inherits="YouBuildYearbooks.ucExpand" %>
What is it exactly you're thinking of achieving and what is your idea with the usage code? Is it something you want to use in the Masterpage, based on data from the user control?
Please tell a bit more about what you're trying to achieve then I think it will be easier to answer. And maybe what you're trying to do can be done in a more efficient manner :)
I am attempting to put a user control into a rich text editor through a macro. I am attempting to determine whether it is possible to use a templated user control.
It is possible to do this a different way, but i just want to see if this is possible for evaluation purposes.
Well, I can't see why it should not be possible. But maybe I'm missing something. But you should be able to use the user control without problems in Umbraco I think.
When you have created the user control make sure that you upload both the .ascx file to the user control folder and the assembly (if any is created) to the bin folder.
Yes i have used user controls with no problems, but I do not see a way of entering custom content inside of the user control through a template like in the code above.
You should be able to create some parameters on your macro, which can be used to pass content to your user control. What kind of content are you thinking about? Just textstrings or content from RTE fields?
I setup parameters by removing the template, but now i have the problem of passing html as a parameter for the .net user control, the html is closed as text. any ideas?
user control template area in macro
Is it possible to have a user control based macro in a content page text area that includes a template area? An example of the standard .NET code is below.
User Control:
<%@ Control Language="vb" AutoEventWireup="false" CodeBehind="ucExpand.ascx.vb" Inherits="YouBuildYearbooks.ucExpand" %>
<div class="divInstructions">
<div id="divExpand<%=ID %>" class="divExpand"><%= Expand %></div>
<div id="divExpanded<%=ID %>" class="divExpanded">
<asp:PlaceHolder runat="server" ID="phExpanded"></asp:PlaceHolder>
</div>
<script type="text/javascript">contract('<%= ID %>');</script>
</div>
Usage:
Hi Chris
What is it exactly you're thinking of achieving and what is your idea with the usage code? Is it something you want to use in the Masterpage, based on data from the user control?
Please tell a bit more about what you're trying to achieve then I think it will be easier to answer. And maybe what you're trying to do can be done in a more efficient manner :)
/Jan
I am attempting to put a user control into a rich text editor through a macro. I am attempting to determine whether it is possible to use a templated user control.
It is possible to do this a different way, but i just want to see if this is possible for evaluation purposes.
Hi Chris
Well, I can't see why it should not be possible. But maybe I'm missing something. But you should be able to use the user control without problems in Umbraco I think.
When you have created the user control make sure that you upload both the .ascx file to the user control folder and the assembly (if any is created) to the bin folder.
/Jan
Yes i have used user controls with no problems, but I do not see a way of entering custom content inside of the user control through a template like in the code above.
Hi Chris
You should be able to create some parameters on your macro, which can be used to pass content to your user control. What kind of content are you thinking about? Just textstrings or content from RTE fields?
/Jan
I have used parameters, but the ExpandTemplate parameter doesn't render on the page.
I setup parameters by removing the template, but now i have the problem of passing html as a parameter for the .net user control, the html is closed as text. any ideas?
is working on a reply...