357 Lotus blogs updated hourly. Who will post next? Home | Downloads | Events | Pods | Blogs | Search | myPL | About 
 
Latest 7 Posts
Forrester Digital Experience Wave
Wed, Jul 30th 2014 105
WebSphere Portal and UI Myths and Facts
Wed, Jul 30th 2014 115
Google Search With Sales Force
Wed, Jul 30th 2014 92
Migrating Web Content Using Kapow (Part 3)
Wed, Jul 30th 2014 92
Hilton Changes The Game, Mobile Enables It
Tue, Jul 29th 2014 146
Enterprise Collaboration and Digital Transformation
Tue, Jul 29th 2014 90
IBM Portlets Running on Liberty Profile on IBM Bluemix
Wed, Jul 23rd 2014 129
Top 10
Official Sitecore Training – Recommendations on Who, What & When
Sun, Dec 23rd 2012 1339
Gartner Magic Quadrant for Horizontal Portals 2013
Wed, Sep 25th 2013 569
IBM Digital Experience v8.5 – What’s Been Removed or Deprecated
Mon, May 12th 2014 513
Adobe Summit: Top new features in Adobe Experience Manager WCM
Wed, Mar 26th 2014 492
Mobile apps using IBM Worklight and WebSphere Portal: a tutorial
Tue, Sep 4th 2012 410
Cool Tools by Gartner
Mon, May 5th 2014 341
Liferay and Single Sign On (SSO) – Whats here and whats coming
Mon, Oct 8th 2012 328
What’s coming in WebSphere Portal and WCM
Tue, Jan 28th 2014 311
SharePoint migrations may cause consternation
Sun, Feb 16th 2014 302
Optimizing Experiences Using IBM TeaLeaf
Tue, Jan 28th 2014 296


Scheduling Future Item Publishing in Sitecore
Jamie Stump    

Whenever we work with a client on a Sitecore implementation, it is inevitable that at some point in the process, the question of scheduling future publishes will come up.  The question is usually phrased something like “Does Sitecore allow me to schedule an item to be published in the future?”  Every time it comes up, I have to chuckle a little to myself, because of the answer that immediately pops into my head.  That answer is “Well, out of the box, sort of, kind of, but not really, no, at least not in an effective real-world manner.  But yes, that can be done.”  And I legitimately think that’s the “right” answer.

I know, you’re now saying to yourself, “How can that be the right answer?  You said yes and no and yes again all at the same time, and still managed to not really say much of anything.”  Well, let me explain.  Out of the box, Sitecore gives the content editors the ability to restrict the publication of any given item (or even specific versions of an item) right in the desktop.  To see this in action, navigate to the “Publish” menu of the Sitecore Desktop Ribbon, and click the Change button in the Restrictions section.  You will get a pop-up that now lets you put in dates for both when an item should go live, and if necessary, when it should be removed from  being live.  The following screenshot shows a portion of this popup:

 Sitecore Publish Restrictions

So, now you’ve got to be thinking “That’s awesome, but doesn’t that answer the original question with a resounding ‘Yes’?”  It sure seems to, except for one little caveat – there’s nothing out of the box with Sitecore that does automatic publishing.  So, given the example in our image above, the current item is only to be published between 3/12/12 at 1:30PM and 3/30/12 at 12:30AM, and that’s what will happen when a content manager explicitly publishes the site.  The first time the site is published after 3/12/12 1:30PM, the item I’ve modified above will be published – so if that first time is 3/15 at 8:30PM, then we had 3+ days where our item wasn’t published, but should’ve been.  Likewise, the first publish explicitly performed after 3/30/12 12:30AM will automatically remove our item from being published, but our item won’t disappear a second before that first publish.  This can be a little misleading to content managers who stumble upon the first screen on their own, as it seems to indicate a positive answer to the question “Does Sitecore allow me to schedule an item to be published in the future?”  It’s important that we, as developers make sure they’re aware of exactly what that publish restriction date does and does not do.

So, I think that details the “sort of, kind of, but not really, no” portion of my answer – now let’s get to the “But yes, that can be done” portion, which is obviously the part clients care most about – the “Yes, I can help you make that happen” part.  A coworker of mine has written some code that when called by a scheduled task, will perform a smart publish on a given site.  The code is thus:

   private void PerformSmartPublish()
   {
         string ProductionWeb = ConfigurationManager.AppSettings["ProductionSiteCoreDB"];

         Database dbSource = Sitecore.Configuration.Factory.GetDatabase("master");
         Database dbTarget = Sitecore.Configuration.Factory.GetDatabase(ProductionWeb);

         Language[] dbLanguages = dbSource.Languages;

         Database[] dbTargets = new Database[] { dbTarget };

         PublishManager.PublishSmart(dbSource, dbTargets, dbLanguages);
   }

 
Once you’ve got that code, you simply need to put it in a place that allows you to call it in a schedulable way.  There are lots of options to do this.  One way is to call the above code from a particular webpage that, while publically accessible, is not publicized as  a part of your Sitecore site (IE: a page that no one knows exists).  Once you have that page, you can schedule a windows task to call your page at a regular interval, and it will automatically perform a smart publish on your site.

Now you have the means to allow Content Managers to administer date restrictions on when items should be published through the Sitecore desktop, and a means to do automatic publishing through a small bit of custom code.  It’s important to note the ramifications of a scheduled publish though.  If your site requires that content goes live at the same time on any given day, you can get away with having your scheduler only call the above code once a day at the proper time.  This should be completely acceptable, and really happen without a hitch.  However, what if your site might need content that goes live at 8:30AM, or 8:45AM, or 12:17PM, or any other arbitrary time of any given day?  Well, then you need your scheduled task to run much more frequently – possibly once every minute.  It’s certainly possible to set your task up to do this, but there will absolutely be an increased amount of processing strain placed on your server to run this code continuously.  Having the ability to publish automatically whenever we want to does not make doing so a best practice.   Another consideration that needs to be clearly communicated to all of your Content Editors when implementing an automatic publish feature is how it affects their items.  Any item that is not in a non-final workflow state, and doesn’t have publishing restrictions upon it will be published by the above code.  That means, if you have your auto-publish scheduled to run at 8:00AM every day, and a content editor saves a change to an item (without any workflow attached to it) at 7:59AM, but does not intend for that item to be published right away, they will be out of luck, because it will be published automatically.

We should be prudent here and say that implementing the above code alone does not preclude a content manager from explicitly performing their own Sitecore publish at anytime they wish.  Our code could be used as the sole means of publishing by removing publish rights from all content editor permissions within Sitecore, thus ensuring that the site is only published when it is scheduled to be.  Our code can just as easily be used in addition to “on-demand” publishes performed by content managers to help prevent items that should be published / unpublished on a schedule missing their target dates.  If you have content managers who are really on the ball, it’s also conceivable they will do regular publishes when they need to be done and you don’t have to implement an auto-publish at all.  Each Sitecore implementation should have its own business rules relating to the publishing of content, and those rules should dictate the methodology that is used.

So, the next time you hear someone ask (or have the question yourself) “Does Sitecore allow me to schedule an item to be published in the future?”, you can feel free to quote me by saying “Well, out of the box, sort of, kind of, but not really, no, at least not in an effective real-world manner.  But yes, that can be done.”, and have confidence that yes, this can be done without a lot of effort!



---------------------
http://feedproxy.google.com/~r/PortalSolutionsBlog/~3/1u5sXN9AX_4/
Mar 09, 2012
32 hits



Recent Blog Posts
105


Forrester Digital Experience Wave
Wed, Jul 30th 2014 3:12p   Mark Polly
Last week Forrester published their first Wave on Digital Experience Platforms.   I was at the IBM Digital Experience Conference and it sounded like IBM was expecting good news from Forrester in this wave.   In fact, Stephen Powers from Forrester was the Keynote speaker at the conference and one of the principal authors of the Wave.   Much to every one’s surprise, the Wave came out with nobody listed as a Leader.  Adobe, hybris (SAP), IBM and Sitecore came out as the Strong Performers [read] Keywords: ibm development sap
115


WebSphere Portal and UI Myths and Facts
Wed, Jul 30th 2014 12:12p   Michael Porter
I don’t know how I missed it but Harish Bhavinachikar has a nice post on what you can do with modern UI tools in WebSphere Portal.  It’s on our Spark Blog but addresses something that keeps coming up again and again.  Frankly, the front-end tools have changed considerably in the last couple years.  Modern UI tools / frameworks like AngularJS, Bootstrap, JQuery, and a host of others make it easier to manage the UI and to further enforce separation of the front-end from the back-end [read] Keywords: ibm css javascript mobile portlet websphere websphere portal
92


Google Search With Sales Force
Wed, Jul 30th 2014 9:12a   Michael Porter
Brendan Callum, a director and whiz extraordinaire in our Salesforce practice, has a video out about what they did with Google Search and Salesforce. The video doesn’t go into a lot of detail but I find it extremely interesting that an appliance (older trend) searches the cloud (ongoing trend) in a secure fashion.  Of course, why do you need detail when someone developed a connector for it and all you have to do it buy, install, and go. [read] Keywords: google
92


Migrating Web Content Using Kapow (Part 3)
Wed, Jul 30th 2014 9:12a   Michael Porter
I’ve blogged about this before with Candace’s Part 1 and Part 2. She just published Part 3 in the series.  Here she focuses on what to do once you’ve extracted and transformed the content.  In other words, getting that web content into the target system. In this case it’s Sitecore, a popular .NET based WCM.  I think it’s great Candace took the time to walk through a step by step approach to this.  Go to her post for the full set of steps and details. Once data [read] Keywords: database microsoft
146


Hilton Changes The Game, Mobile Enables It
Tue, Jul 29th 2014 10:12a   Michael Porter
Hilton announced on their web site that they plan to change the game when it comes to the guest experience at their hotels.  While the press release doesn’t state the investment, the Wall Street Journal quotes it at $550 million.  But what’s really cool is that the smart phone will become: Your room key: bypass the line and head straight to your room The way to choose your room: choose your room from a map of the hotel Special requests: get upgrade, ask for amenities, etc. At fir [read] Keywords: application integration mobile
90


Enterprise Collaboration and Digital Transformation
Tue, Jul 29th 2014 9:12a   Michael Porter
@lizasisler pointed me to an interesting article on CIO.com about the need for digital transformation and how you get there. The answer is of course that you need to break down silos and enterprise collaboration tools will help……. along with cultural change and executive support.  See my deeper color commentary over at Perficient’s Microsoft Blog. What Executive roles champion and support digital transformation? [read] Keywords: collaboration enterprise microsoft
129


IBM Portlets Running on Liberty Profile on IBM Bluemix
Wed, Jul 23rd 2014 11:12a   Mark Polly
You may not have heard of the Liberty Profile, unless you are interested in running WebSphere Application Server in a cloud environment like BlueMix.  Saurabh Agarwal and Jaspreet Singh presented this session at the IBM Digital Experience Conference. What is this Liberty Profile? Liberty is a lightweight WebSphere Application Server that is already embedded in IBM Bluemix which runs on Softlayer.  By lightweight, I mean that the install of the server is fast, startup is fast, and it is optimiz [read] Keywords: ibm application database development dojo eclipse interface portlet profile security server websphere websphere portal xml
114


Why Social Needs to be Part of Your Portal
Wed, Jul 23rd 2014 11:12a   Glenn Kline
IBM’s 2014 Digital Experience Conference started Wednesday off with a great session by Mac Guidera, Social Workforce Strategist from IBM, titled “Why Social Needs to be Part of Your Portal.”  The session was very insightful blending a mix of statistics, trends, best practices and insightful thoughts. Social Business Patterns Patterns represent modernized processes with dynamic, repeatable and measurable “people interactions” created by building social into work and [read] Keywords: collaboration connections ibm applications mac mobile websphere websphere portal
118


Consumer Engagement at Florida Blue with IBM Digital Experience
Tue, Jul 22nd 2014 5:13p   Mark Polly
Glenn Kline of Perficient and Phani Kanakala from Florida Blue presented a case study of how Florida Blue, Florida’s largest healthcare payer, uses IBM Digital Experience to engage consumers.  Florida Blue’s mission is “To improve the health and well-being of Floridians and their communities”.  This really is a good reason to engage customers. Florida Blue has been using IBM Digital Experience platforms since 2008.  Every year Florida Blue added new features and new si [read] Keywords: agent ibm application applications mobile properties server websphere websphere portal
102


IBM Digital Experience in the Cloud: New Options and Capabilities
Tue, Jul 22nd 2014 4:12p   Mark Polly
Tony Higham and Paul Kelsey spoke about deploying IBM Digital Experience on both an on-premise and public cloud.  There are 5 properties of the cloud generally recognized in the market.  IBM is fully supporting each of theses properties: On-demand & Self Service – its there when you need it Broad Network Access – a global network with fast access from any device Resource Pooling – customers share computing resources at some level.  IBM is not really embracing shared har [read] Keywords: ibm application database network properties security websphere websphere portal




Created and Maintained by Yancy Lent - About - Blog Submission - Suggestions - Change Log - Blog Widget - Advertising - Mobile Edition