use poll package in umbraco website - xslt

I'M using umbraco CMS and i want to add or make poll in my website..
After searching for package i found this one POLL PACKAGE FOR UMBRACO 4 which you can get it from umbraco site here . The problem here is that to use it i should insert the macro by myself(the developer) and give it the poll id(which was created by the client).
i want to make this dynamically maybe by using XSLT but the macro is .net UserControl.
if someone used it before give me some idea.

Here's an option:
You can create another document type, in the template of which you load the macro. You can populate the macro parameters based on the properties that are selected on the node of the document type you created using the Advanced macro parameter syntax.
For example, you have a Content picker on the document type and you fill the macro with the id of the node that is chosen. In the master page you would do the following:
<umbraco:Macro Alias="Poll" runat="server" PollNodeId="[#nodeId]" />

Related

Kentico: Adding user control into master page header

I've been trying to find a way to add a user control into the head section of a master page template using Kentico 9.
The usual method of
<%# Register Src="~/CMSWebParts/Homepage/ucControl.ascx" TagPrefix="uc1" TagName="Control" %>
<uc1:Control runat="server" id="ucControl" />
does not seem to work. I'm assuming it's registered as a html template if anything.
Has anyone cam across this before and sorted it?
I'd like to know if this is possible and if so how it's implemented.
Yes, it supports just HTML and macros, so you can either create a custom macro that does same thing as your user control or you can place your user control to the head section of the \CMSPages\PortalTemplate.aspx template that is responsible for generating all live site pages (better option would be to clone the portal template and do the customization there to avoid problems during upgrades due to customized default file)
Option 1: Use the Head HTML webpart, if your stuff can be implemented in this way.
Option 2: Write macros in the masterpage layout - this works if you don't mind doing it on each master page.
Option 3: Write a webpart that instances the control then attaches it to the head. You can put this webpart into the page template that relies on said master. Your codebehind will have to move the user control to a new parent.
Option 4: Modify PortalTemplate.aspx
You can put whatever you like here, but it will make hotfixes more difficult. If you're just adding a single user control this may not be a problem.

Custom MVC Views in WFFM

I am in the process of fitting Sitecore Web Forms for Marketers to a solution. For that to work I need 3 things:
The ability to inject JavaScript from a rul
Rewriting all generated code to use Foundation (instead of Bootstrap)
Be able to read the submittet data of a "changed" form. Ie. a form where there is injected extra field through JavaScript.
My initial questions for this is to the second point: How do I write these views?
I have followed this article: http://www.hhogdev.com/blog/2015/september/customizing%20wffm%20in%20sitecore%208.aspx but unfortunately He does not elaborate on how to generate proper names/ids for fields and the form.
Can anybody point me in the right direction for that?
The blog post you linked to was written based on Sitecore 8.0, and although the module is the same the implementation of WFFM has since changed (unfortunately for the worse IMO).
We are currently using WFFM with Foundation, so it is possible to have them both working together but there are a few things you have to do.
I config disable Bootstrap CSS, this will mean Bootstrap markup but without the CSS files being included. I suggest you style around the given settings as much as possible to save future upgrade issues:
<settings>
<setting name="WFM.EnableBootstrapCssRendering">
<patch:attribute name="value">false</patch:attribute>
</setting>
</settings>
If you need to edit the markup then the default views for the form field markup files can be found under: Website\Views\Form and the EditorTemplates folder under that. Here's the kicker. In versions earlier than 8.0 update-5 the markup did not use the Bootstrap helper and therefore the markup was all present. The latest implementation hides this all away and therefore harder to edit in my opinion.
If you struggle with the Bootstrap markup then take a look at the view files from WFFM 8.0 update-5 or earlier. The markup is much more obvious and you should be able to (essentially) port these over to Sitecore 8.1 and then amend the markup as required (although we have found added the correct surrounding foundation DIV's were enough)
I have no idea what you mean by point 1, but for point 3, you can't. WFFM only works on the fields that you create on the back end, any new fields you create with JS will get lost. If you need to do something clever then use a hidden field (this requires adding a custom field type unfortunately) and then populate this hidden field with the data that you need passed back to the server.

Create Word document of complete list (multiple list items)

I have a Sharepoint 2010 Custom List. I have created a Nintex Workflow to get all the data from the list i need and wrote it into a variable that contains a HTML table. Unfortunatelly Word only sees the code and not the table when i use this variable in a Content field in Word.
What i need is a way to get the filtered items of the list into a Word document (template) as a table.
I know how to do it with a single List Item but not for the complete list. With the Single item it works great with Content Controls but not for multiple items.
We use Sharepoint 2010 and Nintex. My knowledge of JS is zero and we are not allowed to use SPD.
This is not possible with nintex workflow. You need to create a custom workflow using visual studio to achieve this kind of behavior.
You could build an HTML file via a Build String and Web Request (w/ PUT) actions. Then use the Convert Document action to convert it into a Word doc.

Can I insert a Component TEMPLATE Link in the Tridion GUI?

In Tridion, similar to how a field in a schema or metadata schema can either be text, embedded schema, or component link... is there a way to allow the field to be an item select like a component link, but select different types of Tridion objects instead of components?
I'd like the user to be able to select a Compound Component Template or a Page object via selecting it through the interface instead of typing in the tcm into a text field and reading that value.
Is this possible?
No. Links to Component Templates are not handled by the Tridion GUIs. The Tridion Content Manager back-end can handle links to Component Templates in some situations, which is why (for example) you can see the Component Templates show up in the WhereUsed dialog of a Page.
Most people end up using a regular text field for holding such a Component Template link and then use something like Bart's Item Selector to provide an input aid.
You must be careful by creating links to other types than components because they might not be content portable and you will get issues after porting those fields from one environment to another.
Basically the tcm uris won't be resolved by content porter.
This would have to be achieved by building a custom CME (GUI) extension.

Sitecore - multiple instances of a sublayout on a page

We have created some reusable components for our site and have hit a problem when trying to add more than one instance of these component to a page. This is an issue because Sitecore needs the placeholder key to be unique. Does this mean you can never add more than one instance of a sublayout with a placeholder on to the same page?
Example:
Two column sublayout - placeholders 2column-col1 and 2column-col2
Three column sublayout - placeholders 3column-col1, 3column-col2 and 3column-col3
On the page add a two column sublayout, a three column sublayout and then another two column sublayout
There are now 2 placeholders with the name 2column-col1 and 2 placeholders with the name 2column-col2
Is there any way around this? We thought of dynamically creating the placeholder key in the user control code behind but this causes problems if you want to use placeholder settings.
It seems that it would be a common thing to want to do. Is there a workaround?
What you can do is dynamically create the placeholder keys to get the desired functionality and then manually create 5-6 placeholder setting items and duplicate the settings for all of them. I have done this in one project and it works well even though it's very ugly.
If you are using sitecore 6.4+ you might even be able to use cloned items to create the placeholder settings. This way you will be able to control the allowed sub-layouts from the original item and all the rest will just inherit the values.
Hope that helps.
I believe this is a duplicate of your SDN post, but for reference I will link my blog post (with prototype solution code) here as well.
http://www.techphoria414.com/Blog/Dynamic%20Placeholder%20Keys%20Prototype.aspx
In Sitecore 6.3.1 there is a setting in web.config
<!-- DUPLICATE PLACEHOLDERS
Indicate whether to process duplicate placeholders
Default value: false
-->
<setting name="Rendering.ProcessDuplicatePlaceholders" value="false" />
I think this setting is available on all versions of Sitecore 6.
You should give it a try and change it to "true".