Since build 2341 in version 2.1, we introduced the search by the linked status. On the Advanced search pane of the Editorial and Articles navigators, you can find the Linked check-box.
When ticked, the listing displays only the content linked to any page; when empty, the listing displays only the content not linked to any page; when containing a black rectangle, the listing displays linked and not linked content.
In Type you can select Article and Editorial image. It doesn't work for any other type.
Here the instruction on how to add the Linked check box on the search panes. On the previous screenshot, the Linked check box was added on the Advanced pane of the Editorial navigator. You can add it to other panes too. The changes include 1.the schema changes 2.the database upgrade 3.the recomputing for existing linked items, 4.the configuration changes. 1.SCHEMA CHANGES There are changes in gn4.xsd. In GN4.xsd add the "nav" namespace in the schema definition if not already there. <xs:schema targetNamespace="urn:schemas-teradp-com:gn4tera" elementFormDefault="qualified" xmlns="urn:schemas-teradp-com:gn4tera" xmlns:nav="http://www.teradp.com/schemas/GN4/1/ObjNav.xsd" xmlns:gn4="urn:schemas-teradp-com:gn4tera" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:gs="http://www.teradp.com/schemas/GN4/1/XmlSchemaExt.xsd" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" gs:modules="Editorial"> The changes are to be made on the articleExtra and imgExtra groups. They are not consecutive, although they are displayed one below each other in this topic. Have in mind that if there's already a statement <gs:compute inherit="true">, you must not add another one, but add the code after the existing one. Moreover, if there's already a statement <img xmlns:msxsl="urn:schemas-microsoft-com:xslt">, use that one - do not add a new one. On the example below, there's already a code for the isPublished attribute, so the new one is added below it: <xs:group name="imgExtra"> <xs:annotation> <xs:documentation>Additional attributes of the 'img' object type that are rendered as XML element</xs:documentation> <xs:appinfo> <gs:compute inherit="true"> <img xmlns:msxsl="urn:schemas-microsoft-com:xslt"> <xsl:variable name="isPub" select="nav:referencing/nav:referencingBy[@attrName='pubDest.objs']/nav:refs"/> <!-- 'Fake' test of the handle attribute to generate a dependency --> <xsl:if test="string($isPub/@handle)"> <xsl:choose> <xsl:when test="$isPub/nav:refObject/gn4:pubDest"> <isPublished>true</isPublished> </xsl:when> <xsl:otherwise> <isPublished>false</isPublished> </xsl:otherwise> </xsl:choose> </xsl:if> <xsl:variable name="isLin" select="gn4:pageLayers"/> <!-- 'Fake' test of the handle attribute to generate a dependency --> <xsl:if test="string($isLin/@nav:handle)"> <xsl:choose> <xsl:when test="$isLin/gn4:item"> <isLinked>true</isLinked> </xsl:when> <xsl:otherwise> <isLinked>false</isLinked> </xsl:otherwise> </xsl:choose> </xsl:if> </img> </gs:compute> </xs:appinfo> </xs:annotation> <xs:sequence> <xs:group ref="archiveObjectExtra"/> <xs:element name="authorRef" type="reference" minOccurs="0" nillable="true" gs:refer="user"> <xs:annotation> <xs:documentation>Author of the image</xs:documentation> </xs:annotation> </xs:element> <xs:element name="notes" type="tDescription" minOccurs="0"> <xs:annotation> <xs:documentation>Copy-flow notes</xs:documentation> </xs:annotation> </xs:element> </xs:sequence> </xs:group> <xs:annotation> <xs:documentation>Additional attributes of the 'article' object type thatare rendered as XML element</xs:documentation> <xs:appinfo> <gs:compute inherit="true"> <article xmlns:msxsl="urn:schemas-microsoft-com:xslt"> <xsl:variable name="isPub" select="nav:referencing/nav:referencingBy[@attrName='pubDest.objs']/nav:refs"/> <!-- 'Fake' test of the handle attribute to generate a dependency --> <xsl:if test="string($isPub/@handle)"> <xsl:choose> <xsl:when test="$isPub/nav:refObject/gn4:pubDest"> <isPublished>true</isPublished> </xsl:when> <xsl:otherwise> <isPublished>false</isPublished> </xsl:otherwise> </xsl:choose> </xsl:if>
<xsl:variable name="isLin" select="gn4:txts/*/gn4:pageLayers"/> <!-- 'Fake' test of the handle attribute to generate a dependency --> <xsl:if test="string($isLin/@nav:handle)"> <xsl:choose> <xsl:when test="$isLin/gn4:item"> <isLinked>true</isLinked> </xsl:when> <xsl:otherwise> <isLinked>false</isLinked> </xsl:otherwise> </xsl:choose> </xsl:if>
</article> </gs:compute> </xs:appinfo> </xs:annotation> <xs:sequence> <xs:group ref="archiveObjectExtra"/> <xs:element name="authorRef" type="reference" minOccurs="0" nillable="true" gs:refer="user"> <xs:annotation> <xs:documentation>Author of the article - it can be different than the creator if the article is being entered on behalf of someone else</xs:documentation> </xs:annotation> </xs:element> <xs:element name="notes" type="tDescription" minOccurs="0"> <xs:annotation> <xs:documentation>Copy-flow notes</xs:documentation> </xs:annotation> </xs:element> </xs:sequence> </xs:group>
Now, modify the object linkObjectExtra, by adding the highlighted part: <xs:group name="linkObjectExtra"> <xs:annotation> <xs:documentation>Additional attributes of the 'img' object type that are rendered as XML element</xs:documentation> </xs:annotation> <xs:sequence> <xs:element name="isLinked" type="xs:boolean" minOccurs="0" default="false" gs:compute="true"> <xs:annotation> <xs:documentation>Computed boolean: false: not linked - true: linked</xs:documentation> <xs:appinfo> <gs:ui mode="ReadOnly"/> </xs:appinfo> </xs:annotation> </xs:element> </xs:sequence> </xs:group> Pay attention to define the element inside the <xs:sequence> node where other elements are already present. 2.UPGRADE THE DATABASE WITH THE NEW SCHEMA We suggest to run the schema update with the -nocompute option otherwise all linkObject will be recomputed taking a very long time. Here is a sample of the command srv4 dbupdate -s ..\config\schemas\GN4.xsd -d "" -nocompute Remember to verify the path for your schema. Remember to perform the iisreset before proceeding. 3.RECOMPUTE FOR THE EXISTING OBJECTS Recompute only the necessary objects with the command: srv4 recompute -conditions gn4:article 4.MODIFY THE SEARCH PANES In the SHELL4_CONFIG.XML, locate the EditorialPages base query, expand it and then expand SearchList, and then expand searchObjectUI name="Advanced".Add the following code on the position you want, within the searchObjectUI name="Advanced": <attribute path="[linkObject.isLinked]"> <ui label="Linked"> <template kind="CheckBox" opMode="Hidden"/> </ui> </attribute> In the TED4_CONFIG.XML, locate the ArticlePicker base query, expand it and then expand SearchList, and then expand searchObjectUI name="Advanced".Add the following code on the position you want, within the searchObjectUI name="Advanced": <attribute path="[linkObject.isLinked]"> <ui label="Linked"> <template kind="CheckBox" opMode="Hidden"/> </ui> </attribute> Load the both configurations in the database and then try to find linked and not linked items. |
See also
Display list of articles assigned to the current page
Display list of articles assigned to an edition, section, zone or page
Display list of articles linked to the current page
Display list of articles linked to an edition, section, zone or page