I am new to Umbraco and I do not know if im posting this in the right section.
Im trying to port some of my existing code to Umbraco and im looking for a way to jump from 1 "macro/usercontrol" to another.
I think I should provide an example to help explain what I wanna do.
Lets use a webshop as an example. Lets say Im standing in the main basket view (a macro/usercontrol) and wanna jump to the order view (a seperat macro/usercontrol) lets call the macro orderView how would I do this?
Can I do somthing like Response.Redirect(Find("orderView")) with the Umbraco API where it find the orderView macro, and can I pass parameters with the call like a GUID maybe?
I do see your point, and I could do this, but I wanna be able to use this on alot of sites, and this would mean the pages had to be created everytime and the macro added to it. I was hoping I could make it so the system itself could find created macros. Kinda so I could make a macro creater which made the needed macros for a shop and it would work without having to create pages and and macros to em, if you see what I mean.
Btw, if you wanna transfer info like a GUID in umbraco do you then use querystring parameters, or can you do somthing like www.mysite.dk/item;123 and retrieve 123 somehow?
Find macro/usercontrol and redirect to it.
Hello
I am new to Umbraco and I do not know if im posting this in the right section.
Im trying to port some of my existing code to Umbraco and im looking for a way to jump from 1 "macro/usercontrol" to another.
I think I should provide an example to help explain what I wanna do.
Lets use a webshop as an example. Lets say Im standing in the main basket view (a macro/usercontrol) and wanna jump to the order view (a seperat macro/usercontrol) lets call the macro orderView how would I do this?
Can I do somthing like Response.Redirect(Find("orderView")) with the Umbraco API where it find the orderView macro, and can I pass parameters with the call like a GUID maybe?
I hope you understand what I mean.
Hi Jacob,
Why don't you place each macro in a different page? So you can use Response.Redirect().
Hopes this helps.
Sincere regards,
Eduardo Macho
Hi
I do see your point, and I could do this, but I wanna be able to use this on alot of sites, and this would mean the pages had to be created everytime and the macro added to it. I was hoping I could make it so the system itself could find created macros. Kinda so I could make a macro creater which made the needed macros for a shop and it would work without having to create pages and and macros to em, if you see what I mean.
Btw, if you wanna transfer info like a GUID in umbraco do you then use querystring parameters, or can you do somthing like www.mysite.dk/item;123 and retrieve 123 somehow?
Hi Jacob,
My Idea:
1. Get QueryString parameter
for example: www.mysite.dk/item?item_ID=control22
<% if ( !string.IsNullOrEmpty(Request.QueryString["item_ID"]) )
{
%>
<umbraco:Macro Alias="control22" runat="server"></umbraco:Macro>
<%
}
else
{
%>
<umbraco:Macro Alias="defaultControl" runat="server"></umbraco:Macro>
<%
}
%>
HTH
Sincere regards,
Eduardo
Hey
I figured out it was probably better to use a template, then add the macro to the template and find the template, so started this thread:
http://our.umbraco.org/forum/developers/api-questions/14685-Find-node-from-template-alias
is working on a reply...