Page 1 of 1
Calling Webpage Content from Master Page
Posted: Wed Jan 27, 2016 1:58 pm
by gdelorey@mitcs.com
Sorry for what I think is going to be a dumb question - I'd like to be able to have a client manage content via Admin > Website > Webpages and have that content populate in my Checkout.Master page. This will be used to update shipping information from time to time that is currently hard-coded into the master page. What is the proper syntax for calling in webpage content from master pages (and/or .aspx pages)?
Thanks!
Re: Calling Webpage Content from Master Page
Posted: Thu Jan 28, 2016 1:52 am
by jmestep
Here is a sample of how I do it:
Code: Select all
Webpage storage = WebpageDataSource.Load(_Filter1Webpage);
if (storage != null)
{
_Filter1OrderStatusIds = storage.Summary.Trim();
}
Newer versions of Gold do it in the ConLib/CustomHTML like the following. You pass a parameter WebPageId when you call the conlib
Code: Select all
if (_WebPageId > 0) _Webpage = WebpageDataSource.Load(_WebPageId);
if (_Webpage != null && !string.IsNullOrEmpty(_Webpage.Description))
{
CustomHTMLPanel.Controls.Clear();
CustomHTMLPanel.Controls.Add(new LiteralControl(_Webpage.Description));
}
Re: Calling Webpage Content from Master Page
Posted: Thu Jan 28, 2016 7:28 am
by gdelorey@mitcs.com
Hi Judy -
Thanks for your help, worked like a charm!
Greg