How can I check component/page is published to which target? - tridion

I have a situation where I have to find out those publication targets which are deleted some time back in order to unpublish those components/pages which are published and now they are not being unpublished and further not able to delete. (In this case publication targets are not known)
I am using coreservice 2011/2013.

You can see which target a page or component is published to by clicking on Where Used and then the 'Published to' tab. If you want to find all pages and components published to a publication target, then I think you'd need to write some code with the core service. Something like the answer here should work:
https://tridion.stackexchange.com/questions/15090/getting-list-of-published-pages-againtst-a-specific-target-type-in-specific-busi

Related

Report of Pages Author (Publisher) name

I'm working on a large scale content-base website
in this website many Users produce content in many type of pages, and i want to know how many users(author) create how many page and produce content (for example in this month)
(no difference on reports or front-end)
is there any add-on?
There is no addon for this. First you have to define what "create how many page" and "produce content".. is this the the act of adding a page? or publishing the page? it editing the page at all producing content?
There is a "core" report in the cms module named Recently Edited. You can examine this to determine how reports work. Then you will need to add various extension "hooks" to track the operations required...
onBeforeWrite
onAfterWrite
onBeforePublish
onAfterPublish
Within these methods you will probably need to log the data you wish to report on along with Member::currentUserID() and remember while in an extenstion to access the object you need to use $this->owner->FieldName (instead of ($this->FieldName).

Cant see Magnolia CMS Page dialog

I am following the Magnolia CMS documentation -
Creating Page Template. https://documentation.magnolia-cms.com/display/DOCS/Creating+a+page+template
How can I see the properties listed on one-pager-module/dialogs/pages/main.yaml ?
Thanks
How can I see the properties listed on one-pager-module/dialogs/pages/main.yaml ?
Those are dialog fields. For list of possible types of dialog fields see https://documentation.magnolia-cms.com/display/DOCS/List+of+fields
If what you want to see are actual properties with values in a page created by that dialog, log into AdminCentral, go to Tools menu and open JCR Browser in there, select "website" workspace and in the displayed tree of pages expand one you have created. It will list all the properties with their values.
HTH,
Jan
I assume you are looking for all possible options of main.yaml, therefore since its a template definition, one can find the relevant information from: https://documentation.magnolia-cms.com/display/DOCS/Template+definition
Cheers,

Sitecore media item downloads

I need to get number of downloads per document in Media Library. I am using Sitecore 6.4.1 and Sitecore OMS 1.1.1. Is there a Sitecore built-in way or API that allow me to retrieve such information?
Well you cannot make sure that the download has completed, but a hit is registered so you can go to the media item, click the analyze tab and then reports. As far as I remember you should now be able to select a report of hits.
The first thing that you need to make sure that the download is captured by OMS. You have to associate the download event with the item that is downloaded. Once you do that, you can go to the download report and see the number of times it's been downloaded. If you don't associate the download event with the item, however, it will not trigger the page event and therefore will not be trackable in OMS.

Extension to the page icon status in SDL Trdidion 2009

We are using SDL Tridion 2009 SP1.
We have implemented a new functionality, an extension in our CMS which allowed us to lock a page.
If a page it is locked it cannot longer be published ( the information of a page that is locked is kept in a database which was created for this extension).
We want to add a new icon which will notify the user on the new status of the page.
Now there are 4 combination of icons ( no action , checked , published , checked and published )
Since I do not have a long experience with the CMS interface I want some help on finding a solution that have no impact on performance and
that it easy to implement in terms of not doing of lot of modification.
Below is my investigation regarding this:
I noticed that the way the icons are render in the cms is not a simple mechanism that can be easy updated.
Each time we click on an item in the left side of the CMS, in order to render the list from the right side a ajax call (with an xml request) is done to the WebGUIResponder.aspx. page.
The response we will get back is a xml that contain the attribute field Icon
<tcm:ListItems xmlns:tcm="http://www.tridion.com/ContentManager/5.0"
ID="tcm:yyy-zzzz-4" Managed="68" ItemType="4">
<tcm:Item ID="tcm:yyy-zzzzz-64" Type="64" Title="NotificationTest"
Modified="2011-05-09T09:42:27" FromPub="400 YYYY Website Master (EN-GB)"
IsNew="false" Icon="T64L0P1"/>
</tcm:ListItems>
Based on this field Icon attribute (Icon="T64L0P1) the image name starts to be processed.
T64 = means it is a page
L0 = is not checked
P1 = it is already published
For such a field the image name result will be = T64.16x16.List.Published.gif
I couldn't find a way to update this field through the page xml, is not an information that is kept in the xml but rather is build in the dll when the
xml request . (Somewhere based on other fields like published and something else this Icon field is calculated.)
So if it is not possible to modify this field the option we may have is:
In order to integrate our change in the CMS without modifying their .dll (this for compatibility with the new version of the SDL Trdion is not good to modify in the dlll)
and without changing too much the logic I was thinking to this approach.
We can make a new Ajax call to a a new page WebGUICheckPageLocked.aspx (need to be tested what will be the impact on the performance).
In the code behind of this page we can determine if the page is locked or not ( used our internal function that determine if the page is locked or not this functionality is already done).
In the page we will change the icon field to something T64L0P1E01 (adding some extra information which will allowed us to determine the new status of the page ).
We will also modify the In the GetPNGIconName javascript function we can then make an extra check taking in consideration the new information E01 ...)
Please if someone have some better idea on this, maybe it is something easy that can be done, maybe it is a way we can update the Icon field.
Kind Regards,
Cristina
I'll paste my answer from the forums here, so everyone can see (and maybe bring ideas on how to do it differently?)...
In 2011 I would use a Data Extender to change the icon.
Since this is 2009 you will need to use the less elegant predecessor: the GUI Responder Extension.
Essentially you need to manipulate the XML that is returned for the relevant requests (such as the GetList on a Folder).
I couldn't immediately find any documentation on this - which is not surprising as it is an older version. But it boils down to this:
Create a .NET assembly containing a class with the following method signature and attribute:
[ResponseMessageHandler]
public XmlDocument HandleMessage(XmlDocument messageXml, string userName, HttpContext httpContext, object tcmSession)
In that method, you can change the icon set in the XML based on your own logic.
In the extension configuration file, add a section to hook into the response for the lists you care about
(substitute "YourResponderExtension.dll" with the name of the assembly you added):
<ProcessResponse>
<!-- GetList -->
<ExecuteWhen>/tcmapi:Message/tcmapi:Response/tcmapi:Request/tcmapi:GetList</ExecuteWhen>
<!-- Handler for all of the above -->
<Execute>/bin/YourResponderExtension.dll</Execute>
</ProcessResponse>
Add more elements before the if applicable - and make the XPath query as specific as you can to avoid your extension being called unnecessarily. You might also need to check for more cases in the .NET code that you can't do with the XPath query.
ZIP up your extension and deploy it with TcmExtensionInstaller.exe.
From your text I'm assuming you've already worked out how to create and package an extension in 2009.
I hope that these smalls steps can get you started.
If you have any trouble or follow-up questions, just let me know and I'll see if I can answer them.

Scheduling and publishing replacement pages in a CMS

Does anyone have any ideas or know of any plugins to allow pages to be scheduled and replaced.
preamble:
currently evaluating different content management systems for a new project, we create new pages and also updating existing pages for example as part of a 'maintenance release'.
We will be using either PHP (preferably) or C#
Problem:
We would like our users to be write and save a new revision of an existing page with a go-live date and time in the future, at this date and time we would like the page to be live replacing the existing page, but all links to the page, url etc to be the same.
Currently:
We have two separate installs and schedule updates to pages using a cron job and a PHP script running some mysql queries - this has failed us at critical times in the past when it has failed to run.
finally:
We could probably write this ourselves, either in our own CMS or as a plugin to an existing CMS - simply:
SELECT latest_revision from posts_pages_table
WHERE publishable='yes'
AND max(revision_date);
but does anyone have any experience of this with an existing CMS or from a technical point of view foresee any problems?
How for example in a wordpress backend will a user be sure they are updating the latest version of a page if it hasn't gone 'live' yet.
We have looked at all existing CMSs and searched google but scheduling updates to pages seems to be an uncommon occurrence so relying on some guidance from the trusty SO crowd.
thanks
If you are fine with PHP, you can use SilverStripe. To achieve what you are asking you'd use the CMS Workflow module.
SilverStripe CMS comes with two stages built-in: live and draft. You can keep reworking the draft version, which remain private until you are ready to publish. In the normal scenario you would just push to live.
With the CMS Workflow installed, you can additionally choose the date when the modification should go live ("embargo"). This stores your draft version for "later", and only pushes to live at the date you've chosen (this plugs in via the cron job).
There is also an "expiry" you can set on the page, at which point the page will be unpublished and will no longer be available publicly.
Embargo, expiry and publishing operations do not affect the URL nor ID of the page, so all the relations stay intact while you are reworking the page via the CMS.
References:
PDF manual, see page 16 for description of the embargo
Module page with a short description
Source
In Joomla, there is a way to do this out of the box without touching any code. Here's how I would do it -
Create a category for the page that will be getting replaced
Create a menu item pointing to that category. Set it to display 1 item only, ordered by newest date
Create a template override so that the category item displays like an article detail page
Create new articles with a start publish date that determines when it starts displaying
Basically, you'd be displaying a category but it would look like an article. It would always pull the newest article that has reached it's start publish date. It would be easy to keep track of because you would have copies of every version you post, each update you would simply make a copy of the last one to edit.
You could probably write something custom to accomplish the same thing, but why spend the time and effort when it can be done easily with a template override?

Resources