tag:help-archives.hannonhill.com,2010-02-09:/discussions/general/18635-using-publish-triggers-to-update-html-of-a-pageCascade CMS: Discussion 2014-08-20T13:07:47Ztag:help-archives.hannonhill.com,2010-02-09:Comment/339644062014-07-31T12:40:15Z2014-07-31T12:40:15ZUsing Publish Triggers to update HTML of a page<div><p>Hi,</p>
<p>Updating the HTML of a page should definitely be possible. Are
you referring to a published page by chance? If so, you would most
likely need to call a script on that server that modifies the file
on the server.</p>
<blockquote>
<p>The second thing: Is it possible to use Publish Triggers to
modify the cascade elements of a webpage</p>
</blockquote>
<p>This should be possible using the Web Services API from within
your Publish Trigger.</p>
<p>Note: Publish Triggers are called for every asset that is
published, so you would want to add in some checks to make sure you
are updating things appropriately and not too frequently.</p>
<p>Please let me know if you have any questions.</p>
<p>Thanks!</p></div>Ryan Griffithtag:help-archives.hannonhill.com,2010-02-09:Comment/339644062014-07-31T13:47:20Z2014-07-31T13:47:20ZUsing Publish Triggers to update HTML of a page<div><p>Thanks for the help.</p>
<p>For the second question, is there a friendly place that the Web
Services API is located?</p></div>ces55739tag:help-archives.hannonhill.com,2010-02-09:Comment/339644062014-07-31T14:05:54Z2014-07-31T14:05:54ZUsing Publish Triggers to update HTML of a page<div><p>Not a problem at all.</p>
<p>Actually, my apologies, you wouldn't need Web Services here.
Instead, you can use the Cascade Server API that is included with
the Publish Trigger SDK. Specifically, you will have access to
various operations (ie read and edit), as well as various methods
for the different types of assets.</p>
<p><a href=
"https://gist.github.com/rgriffith/7ad8e1639dc77e4dde7f">Here is a
sample Publish Trigger</a> I wrote for a client that calls an
external script. This has an example of how to read a file or page.
<a href=
"https://gist.github.com/rgriffith/28ca51a9f24d6d285d21">Here is
another sample Publish Trigger</a> that demonstrates reading an
asset and uploading a .docx version of the file onto a web
server.</p>
<p>Please let me know if you have any questions.</p>
<p>Thanks!</p></div>Ryan Griffith