Great thank you. That worked. Can you help me understand something?
So I like many things of Umbraco however what is troublesome is...how would i know that answer? (Am I missing some documentation or some logic on how Umbraco works?) Where would I have looked for that type of answer?
I did get it to work through a few hours of trial and error by hardcoding in the twitter access token/token secret etc. I did not like this approach but I found i was unable to get the uTwit config parameter.
In Umbraco you can access data from different axes. Try to see this documentation, but it is bit old https://our.umbraco.org/documentation/reference/templating/macros/razor/using-razor-axes, so if you are using Partail view macros or partial views the current page if you are using dynmic Razor is CurrentPage, if you are using strongly typed Razor then the current page is Model.Content.
utwit not on home page
I was able to follow the instructions to get the view latesttweets.cshtml showing on the home page.
I placed the reference to the partial view in the master page
This works fine.
The problem is that when a user navigates away from the home page i lose the tweets.
I have the twitter oauth property associated with the Home document type. I suspect that is why when users go to another page it no longer works.
Which document type do I associate the oauth twitter property with so that when users navigate to another page the latesttweets.cshtml still works?
thx
Hi Dave,
You just need to make some small changes to the view latesttweets.cshtml.
You just need to add .AncestorOrSelf(1) into the Model.Content so the full code with the changes would look like this:
Hope this helps,
/Dennis
Great thank you. That worked. Can you help me understand something?
So I like many things of Umbraco however what is troublesome is...how would i know that answer? (Am I missing some documentation or some logic on how Umbraco works?) Where would I have looked for that type of answer?
I did get it to work through a few hours of trial and error by hardcoding in the twitter access token/token secret etc. I did not like this approach but I found i was unable to get the uTwit config parameter.
thx
Hi Dave,
In Umbraco you can access data from different axes. Try to see this documentation, but it is bit old https://our.umbraco.org/documentation/reference/templating/macros/razor/using-razor-axes, so if you are using Partail view macros or partial views the current page if you are using dynmic Razor is CurrentPage, if you are using strongly typed Razor then the current page is Model.Content.
Perhaps these cheat sheets https://our.umbraco.org/projects/developer-tools/umbraco-v6-mvc-razor-cheatsheets can help to get an overview over the different methods that you have in Razor. I know it says for Umbraco 6, but so be fine for Umbraco 7 also. It´s just some PDF files with an overview.
Hope this answers your questions, else don't hesitate to ask again.
/Dennis
is working on a reply...