i need to get the content of a page to always publish.
there is a usercontrol with some radio buttons and a submit button . when this submit button is pressed the page gets its property changed. but it doesent update - since you need to publish the site first!
but i have a macro that pulls out the info from the properties on the pages - but it doesent update untill i publish ??
<xsl:template match="/">
<!-- The fun starts here --> <xsl:variable name="voteNodes" select="umbraco.library:GetXmlNodeById(1363)/node[not(data[@alias = 'umbracoNaviHide'] = 1)]" />
<xsl:value-of select="sum($voteNodes/data[@alias = 'votes'])" /> har stemt totalt
but unfortunately it diddent have a "toal number of votes"
i made a that macro there to pull out all votes from pages in the poll. and add them together. - which works
but for some reason it doesent update when the poll does? - the properties do get filled with new data when submit is hit - but the macro i made doesent collect new data
that is my problem
I am unable to get to the backend code of the poll - hence i made the macro - which seemed to work - untill i noticed the macro diddent update on page refresh ?
Ahhh, ok, I don't know too much about the poll package. But I'd make sure you have all caching turned off on your macro. This should force your macro to re-render on every page load, therfore it should retreive fresh data.
can you set a page to auto publish?
i need to get the content of a page to always publish.
there is a usercontrol with some radio buttons and a submit button . when this submit button is pressed the page gets its property changed. but it doesent update - since you need to publish the site first!
big problem !
what can be done ?
You can use the Umbraco API within the button handler? Checkout the following wiki page for modifying and publishing a page via the API
http://umbraco.org/documentation/books/api-cheatsheet/modifying-document-values
Matt
ok i messed it up -
the usercontrol updates fine -
but i have a macro that pulls out the info from the properties on the pages - but it doesent update untill i publish ??
<xsl:template match="/">
<!-- The fun starts here -->
<xsl:variable name="voteNodes" select="umbraco.library:GetXmlNodeById(1363)/node[not(data[@alias = 'umbracoNaviHide'] = 1)]" />
<xsl:value-of select="sum($voteNodes/data[@alias = 'votes'])" /> har stemt totalt
</xsl:template>
in your user control, define a click handler (or some other handler when the user interacts) and just tell it to update the page?
Matt
urgh - im terrible at spelling out my problem :D
ok i am using this here package - http://our.umbraco.org/projects/website-utilities/poll
this poll works as it is intended.
but unfortunately it diddent have a "toal number of votes"
i made a that macro there to pull out all votes from pages in the poll. and add them together. - which works
but for some reason it doesent update when the poll does? - the properties do get filled with new data when submit is hit - but the macro i made doesent collect new data
that is my problem
I am unable to get to the backend code of the poll - hence i made the macro - which seemed to work - untill i noticed the macro diddent update on page refresh ?
Ahhh, ok, I don't know too much about the poll package. But I'd make sure you have all caching turned off on your macro. This should force your macro to re-render on every page load, therfore it should retreive fresh data.
Matt
hm ok where can i set the caching ?
Go to Developer > Macros > Your Macro and ensure, cache period is 0, and cache by page, and cache personalized are unchecked.
Matt
hmm unfortunately that diddent do anything :(
Hi Jan,
Hmmm, I'm not entirley sure then. Your best bet might be to request help in the packages support forum:
http://our.umbraco.org/projects/website-utilities/poll/help-using-the-poll
Many thanks
Matt
is working on a reply...