I am looking add custom code to an Umbraco 7 site. I have done this a number of times before using a razor script/ macro and also by using a surface controller for a contact form.
What I require now is a little different. I have created a simple twitter feed for the website and would like to show it on a number of templates. I have tried to use the above without any success. I cannot use the razor script and macro approach as I need to reference an external dll and it keeps complaing. I have tried to use the surface controller approach but the code for the controller doesnt seem to run on a get, only on a post.
Maybe I am doing something incorrect or maybe its the wrong way to do these type of things.
Can any body please advise? Are any of the above the correct approach? if not, do you have a link for any tutorials/documentaion of how to do this correctly?
Your code is missing from the post so could you please try adding it again? If you're using the markdown editor then make sure to mark the code part and click on the button with the "101010" numbers.
Where to put custom code
Hi all.
I am looking add custom code to an Umbraco 7 site. I have done this a number of times before using a razor script/ macro and also by using a surface controller for a contact form.
What I require now is a little different. I have created a simple twitter feed for the website and would like to show it on a number of templates. I have tried to use the above without any success. I cannot use the razor script and macro approach as I need to reference an external dll and it keeps complaing.
I have tried to use the surface controller approach but the code for the controller doesnt seem to run on a get, only on a post.
Maybe I am doing something incorrect or maybe its the wrong way to do these type of things.
Can any body please advise? Are any of the above the correct approach? if not, do you have a link for any tutorials/documentaion of how to do this correctly?
Many thanks
Hi Jamie and welcome to our :)
Your code is missing from the post so could you please try adding it again? If you're using the markdown editor then make sure to mark the code part and click on the button with the "101010" numbers.
Cheers, Jan
Hi Jan,
Thanks for your help. Here is my code. This is using LinqToTwitter. TwoTweet is my model with two strings.
Sorry to bump this. I am just eager to try and do things the correct way and not just hack things together.
Thanks
Hey, Curious to know if you figured it out. I am trying to do something similar
is working on a reply...