I'm using Umbraco 4.9.0 I have a page that is using the accordion container, I have created a wysiwyg content item and placed a macro in it. The macro contains aspx code to access a table and display information.The backend display the content but the webpage appears blank.Is there something that I'm missing here?Thanks
To get the content to appears on the webpage you have to use the umbraco:item. The umbraco:item is used in templates to pull a property from the page, currently being rendered. So in your case, you have to find the template where you want to print out the data.
In template you have to add umbraco:item, by usig this syntax.
<umbraco:item field="bodyText" runat="server"/>
This example will renders the value with the alias "bodyText" from the current page, if the value does not exist, nothing is rendered.
Another way to add the umbraco:item in the templates can be done by the umbraco backoffice. Go to the Settings section --> Templates. When you have find the template where you want the data to be pull out, click on the second button from left in the UI.
After that you will get i dialog box, where you can choose and insert the field you want to render in the template.
If you have any other questions about this keep asking, and I will try to help you.
I have code that is displaying other content on the page from a data base just not in the accordion container. What is strange is that it displays in the area where you insert the macro on the wysiwyg container, of course if I just type in content in the wysiwyg container it works fine.
I´m not sure that I understand your question then. If it right that you have an field on you page of the type rich text editor. And in this rich text editor, you add an macro that display on the page in the backoffice of Umbraco but not on the frontpage of the website.
If I am right the rich text field is contains some text and then you add an macro inside the rich text editor too. I think that the text will be display on the website, but your issue is that the content of the marco issen´t being displyed on the webpage right now.
I would guessyoutodayprintareavia eitheran XSLTmacroorRazormacro. Therefor go to the template where you are pull the data out from the field. If you´re working inside Umbraco to the Settings section --> Templates. When you have find the template where you want the data to be pull out, click on the second button from left in the UI.
Then switch the macro with an umbraco:item
<umbraco:itemfield="bodyText"runat="server"/>
Remember to change the field name to the alias of your field that you want to pull out.
I have made some screenshot to make this easy to understand what I mean.
To get this content of the macro to being display on the website you have to use the umbraco:item in the template where you want the data to being pulled out.
So in the specific template I will add the umbraco:item eitherthrough the Umbraco UIor justby writingit yourself.
After that you template should have the umbraco:item that pull the data off the rich text editor out. It will look something like this.
And on my frontend of the website it will look like this
So the text in the rich text editor is rendered together with the content of the macro that was inserted in the backend. So it was adetailed presentation ofhow todo it :-)
Hope this helps and I don't hope that I have misunderstood your question totally. And of course just ask questions if you have. I will try to help you as much as I can.
I will be displaying a Table of data from a separate SQL database/table and I would like it to display inside of an existing page that is working that has had an accordion container added to it, along with a wysiwyg container inside of that.
I have a c# macro that I have created to connect to the database and gather the information to be displayed in an HTML table which I would expect to be displayed in the wysiwyg container. While inside the Umbraco admin interface the data is displayed in the area where I have inserted the macro but when viewing the live site there is no data displayed in the accordion area,the rest of the page displays fine.
macro display inside of accordion container
I'm using Umbraco 4.9.0 I have a page that is using the accordion container, I have created a wysiwyg content item and placed a macro in it. The macro contains aspx code to access a table and display information.The backend display the content but the webpage appears blank.Is there something that I'm missing here?Thanks
Hi Paige,
To get the content to appears on the webpage you have to use the umbraco:item. The umbraco:item is used in templates to pull a property from the page, currently being rendered. So in your case, you have to find the template where you want to print out the data.
In template you have to add umbraco:item, by usig this syntax.
This example will renders the value with the alias "bodyText" from the current page, if the value does not exist, nothing is rendered.
Another way to add the umbraco:item in the templates can be done by the umbraco backoffice. Go to the Settings section --> Templates. When you have find the template where you want the data to be pull out, click on the second button from left in the UI.
After that you will get i dialog box, where you can choose and insert the field you want to render in the template.
If you have any other questions about this keep asking, and I will try to help you.
Hope this helps.
/Dennis
Hi Dennis,
It looks like the template does have the umbraco:item
I have code that is displaying other content on the page from a data base just not in the accordion container. What is strange is that it displays in the area where you insert the macro on the wysiwyg container, of course if I just type in content in the wysiwyg container it works fine.
Any other thoughts?
Thanks
Hi Paige,
I´m not sure that I understand your question then. If it right that you have an field on you page of the type rich text editor. And in this rich text editor, you add an macro that display on the page in the backoffice of Umbraco but not on the frontpage of the website.
If I am right the rich text field is contains some text and then you add an macro inside the rich text editor too. I think that the text will be display on the website, but your issue is that the content of the marco issen´t being displyed on the webpage right now.
I would guess you today print area via either an XSLT macro or Razor macro. Therefor go to the template where you are pull the data out from the field. If you´re working inside Umbraco to the Settings section --> Templates. When you have find the template where you want the data to be pull out, click on the second button from left in the UI.
Then switch the macro with an umbraco:item
Remember to change the field name to the alias of your field that you want to pull out.
I have made some screenshot to make this easy to understand what I mean.
To get this content of the macro to being display on the website you have to use the umbraco:item in the template where you want the data to being pulled out.
So in the specific template I will add the umbraco:item either through the Umbraco UI or just by writing it yourself.
After that you template should have the umbraco:item that pull the data off the rich text editor out. It will look something like this.
And on my frontend of the website it will look like this
So the text in the rich text editor is rendered together with the content of the macro that was inserted in the backend. So it was a detailed presentation of how to do it :-)
Hope this helps and I don't hope that I have misunderstood your question totally. And of course just ask questions if you have. I will try to help you as much as I can.
/Dennis
I guess I am not explaining the issue correctly.
I will be displaying a Table of data from a separate SQL database/table and I would like it to display inside of an existing page that is working that has had an accordion container added to it, along with a wysiwyg container inside of that.
I have a c# macro that I have created to connect to the database and gather the information to be displayed in an HTML table which I would expect to be displayed in the wysiwyg container. While inside the Umbraco admin interface the data is displayed in the area where I have inserted the macro but when viewing the live site there is no data displayed in the accordion area,the rest of the page displays fine.
Hi Paige,
I´m sorry that I have misunderstood your question completly.
Once again I´m sorry.
/Dennis
no problem Dennis,
I have taken over this site from someone else and I don't know a lot about Umbraco.
do you know if the accordion container will execute macro code like that?
Is there any documentation that you can point me to so I can research it?
Thanks
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.