Examples of Web publishing questions and answers

Build 1501 on 14/Nov/2017  This topic last edited on: 28/Oct/2016, at 11:47

REQUEST

SOLUTION

Publishing without links - As it is not a simple task to determine the pages and position for where stories should be published, we have stopped creating links and instead simply published to a folder with meta-data that repeaters can use to determine where content should actually appear.

Comment out the $linkData line from the updateExecutionLog transformation within the publishToGNweb workflow, or even better, clear the complete changedWF section of the publishing template.

Menus. Having switched to not using linked documents - but instead using meta-data to determine article location we have an issue with menus on the site. Because linked documents use paths to determine position you were able to show, through CSS, which menu item you were viewing the article within - For example articles on the Sports page would have the sports menu item highlighted.

When using meta-data to determine position you cannot do this because the item does not exist below a page. You look at articles on the Sports page but the article itself is somewhere else in the system and so the Sports menu item is not highlighted.

How can we retain a multi-level navigation menu highlighted structure when the content is not actually linked to any of the pages and therefore we do not know where we can from to attempt to modify CSS on the fly to highlight menus?

This would require changes in the standard menu web parts to consider the current document data and not its node path. Maybe looking at the Kentico knowledge base you could find an example.

We have recently started to publish stories with variants (created by multi-crop workflow). Previously images appeared to publish correctly but after using variants these crops never appeared on the site. In debugging the output XML we found that the URL to the cropped variants was using the UNSAFE web application instead of the standard application. Images were therefore not appearing on the website because I had not set up an UNSAFE application.

What was very "odd" was that if a story was published with out variants (but contained images) it would use the standard application URL but as soon as you created a variant it would use the UNSAFE one. I traced this in code to the $dataURL which was generated from the loginContext session information. Why would creating variants cause the $context/lc:LoginContext/@ServerUrl to be self://localhost and not http://gn4.alhayat.com/gnportal like everything else?

I have since created an UNSAFE application - but variants images take a long time to appear on the site after a publish (especially after a re-publish) so something is not quite right still.

The gnweb template uses the transformation readArticleBinaries to get the ids of the images to send. Normally there's no any usage of the unsafe url for getting the data files.

We have published some stories to the website, and then changed them and republished them. However the changes were not replicated as expected. While textual content was updated, the images sent with it were not - specifically if a story was sent with images A, B and C but then republished with images C, D, E the article in Kentico would contain images A, B, C, D and E.

How can we ensure that images already published are removed in an update?

Try to send the parameter updateIfExists =false, this will regenerate the article, and so its children.