Hi guys,
I'm new in UmbracoCMS. I need to create a portable plugin.
When it is installed, a new section is created in the column where the sections "Content" etc.
This new section contains dashboard.
Dashboard contains textbox with label 'Code' and button with text 'Save'.
When the 'Code' is entered and the button 'Save' is pressed
then for all pages when rendering is added Google Analytycs Code with saved code.
Where do I start and which way to go?
thanks for the help
Normally we implement this by having a setting on the root node of the website. On all pages, we then refer the root node, and read the code and render it if present. The settings can also be implemented in a settings node that may be created under the site, the same way other content (ie. pages) are created.
This way we just need to add a property instead of creating a new section. You would also need somewhere to store the content if you create a custom section. The solution described above is much simpler.
Unfortunately i didn't get an answer there.
In my project, I created a folder 'Plugin' in which I added files for the plugin. When I create a plugin and as a source I use this folder and then install the plugin (.zip file), the plugin works.
And thanks to the debugger VisualStudios, I found that the 'Plugin' folder is working and not the files from .zip. When I install a plugin (.zip) into another project, nothing works. Why is that ?
Plugin to add Google Analytics' Code to Page
Hi guys, I'm new in UmbracoCMS. I need to create a portable plugin. When it is installed, a new section is created in the column where the sections "Content" etc. This new section contains dashboard. Dashboard contains textbox with label 'Code' and button with text 'Save'. When the 'Code' is entered and the button 'Save' is pressed then for all pages when rendering is added Google Analytycs Code with saved code.
Where do I start and which way to go? thanks for the help
Hello Eugen
Question is how to add needed code to all pages to site that you installed the package.
It's like you need to edit templates code and needed scripts after, I wouldn't recommend do it.
Thanks,
Oleksandr
Hi Eugen,
Normally we implement this by having a setting on the root node of the website. On all pages, we then refer the root node, and read the code and render it if present. The settings can also be implemented in a settings node that may be created under the site, the same way other content (ie. pages) are created.
This way we just need to add a property instead of creating a new section. You would also need somewhere to store the content if you create a custom section. The solution described above is much simpler.
Hi Eugen,
is this the same as you ask before in here:
https://our.umbraco.com/forum/using-umbraco-and-getting-started/94281-dynamically-adding-text-to-view
/Michaël
Unfortunately i didn't get an answer there. In my project, I created a folder 'Plugin' in which I added files for the plugin. When I create a plugin and as a source I use this folder and then install the plugin (.zip file), the plugin works. And thanks to the debugger VisualStudios, I found that the 'Plugin' folder is working and not the files from .zip. When I install a plugin (.zip) into another project, nothing works. Why is that ?
is working on a reply...