Including user control in rendered list of e.g. expo boxes or news
Working on my first Umbraco powered site I've gotten stuck on the following.
Background "story" On the side, the right side bar contains a number of expo boxes. I want these boxes to be editable by the end user.
I have created a site tree for all the main pages, and totally seperate from this is a "Content folder" containing collections of expo.
Example of structure
- Site pages (home) - News - About us - ... etc. - Content folder - Expo box collections - Standard expos - Who are we? - Why trade with us? - Newsletter subscription - Standard expos excl. newsletter subscription - Who are we? - Why trade with us?
- Christmas expos - Who are we? - Why trade with us? - Newsletter subscription - Christmas bonus
The customer can create new expo collections, and add or remove expos to the collections. For each page on the site, they can select which expo collection they want to show in the right side bar. The actual expos are simple document types with e.g a link and an image. These are rendered using XSLT - and it all works perfectly.
The problem The newsletter subscription is a user control. The customer will not be able to edit its content or functionality, but I would like for them to be able to add or remove it to the "expo box collections" and decide their position in respect to the other expos (below, above, number 3 etc.)
Since I'm in the context of an XSLT script, I can't "embed" or output a macro or user control. Do I need to use a completely different architecture for my expo-setup, or is there a clever workaround?
But that didn't help. My knowledge about the Umbraco page lifecycle is limited, but I have read elsewhere that it is not possible to list one macro in another (the XSLT macro ExpoListing.xslt tries to call the user control macro NewsletterSubscriptionExpo)
It's a bit of a work around, but if you changed your "Newsletter Subscription" to just be a empty node, your xslt could identify when the Newsletter content should be output, but instead output the macro in the above method.
Including user control in rendered list of e.g. expo boxes or news
Working on my first Umbraco powered site I've gotten stuck on the following.
Background "story"
On the side, the right side bar contains a number of expo boxes. I want these boxes to be editable by the end user.
I have created a site tree for all the main pages, and totally seperate from this is a "Content folder" containing collections of expo.
Example of structure
The customer can create new expo collections, and add or remove expos to the collections. For each page on the site, they can select which expo collection they want to show in the right side bar.
The actual expos are simple document types with e.g a link and an image. These are rendered using XSLT - and it all works perfectly.
The problem
The newsletter subscription is a user control. The customer will not be able to edit its content or functionality, but I would like for them to be able to add or remove it to the "expo box collections" and decide their position in respect to the other expos (below, above, number 3 etc.)
Since I'm in the context of an XSLT script, I can't "embed" or output a macro or user control. Do I need to use a completely different architecture for my expo-setup, or is there a clever workaround?
If I'm following you correctly, could you not
What stops you taking this approach?
Chris
Yes, I think you are, and I have actually tried just that (didn't mention it since the post was long enough already ;o).
But the output I get is the raw macro declaration:
First I used this XSLT
Then I found out it was HTML-encoding the the < > chars and changed it to
But that didn't help. My knowledge about the Umbraco page lifecycle is limited, but I have read elsewhere that it is not possible to list one macro in another (the XSLT macro ExpoListing.xslt tries to call the user control macro NewsletterSubscriptionExpo)
There was a similar discussion here http://our.umbraco.org/forum/getting-started/questions-about-runway-and-modules/3922-Listing-videos-from-macro
It's a bit of a work around, but if you changed your "Newsletter Subscription" to just be a empty node, your xslt could identify when the Newsletter content should be output, but instead output the macro in the above method.
Chris
Works perfectly! Thanks a lot :-)
Greets,
Torben
is working on a reply...