Unable to Rendering WEM CI's Name in the Browser Title

Hi,

Currently we are using <title> tag in the body section to assign Content Name (In Display View). But We want to move the <title> tag from body to head. In Portal Grid component, I tried but I couldnt get the Contnet Name (Followed DPM developer guide Page#58).

Kinldy please help me to fix this issue.

 

Thanks

Jayaram

Comments


  • You will need to use a cross context include to a jsp in templating context  "/vgn-ext-templating/partial/head.jsp"

    In the head.jsp in teamplating webapp you will use initalize the RequestContext object and then get the handle to Primary Content and read title from it to render the <title> tag

    I hope this makes sense.

    Best Regards

    Qutubuddin Saifuddin

    Architect
    Open Text
    Mobile : 732 397 7951
    Email : qsaifudd@opentext.com
    Website : www.opentext.com

    From: eLink Entry: Discussion Group - Web Experience Management [v7webcontentmanagement@elinkkc.opentext.com]
    Sent: Thursday, August 17, 2017 3:31 AM
    To: eLink Recipient
    Subject: Unable to Rendering WEM CI's Name in the Browser Title

    Unable to Rendering WEM CI's Name in the Browser Title  Posted by Ponnusamy, Jayaram On 08/17/2017 03:29 AM
     
    Hi,Currently we are using <title> tag in the body section to assign Content Name (In Display View). But We want to move the <title> tag from body to head. In Portal Grid component, I tried but I couldnt get the Contnet Name (Followed DPM developer guide Page#58).Kinldy please help me to fix this issue. ThanksJayaram

    [To post a comment, use the normal reply function]
    Forum: Discussion Group - Web Experience Management
    Content Server: Knowledge Center CS16
  • Hi Qutub,

    I created a jsp (head.jsp) and placed it in sites.war (vgn-ext-templating) but getting null value only. like Dynamic Portal & Dynamic Site Developer's guide chapter 5.3.1 but it didnt work. Kindly please help

     

    head.jsp (placed it in sites.war)

    <%@ page import="java.io.*" %>
    <%@ page import="java.lang.*" %>
    <%@page import="com.vignette.as.client.javabean.ContentInstance"%>
    <%@page import="com.vignette.ext.templating.util.PageUtil"%>
    <%@ page import="com.vignette.ext.templating.util.RequestContext" %>
    <%@ page import="javax.servlet.jsp.PageContext" %>
    <%@ page import="java.io.*,java.util.Locale" %>
    <%@ page import="java.util.*" %>
    <%@ page import="java.util.ResourceBundle" %>
    <%@ page import="com.vignette.as.client.common.ref.AsLocaleRef" %>
    <%@ page import="com.vignette.ext.templating.util.PageUtil" %>
    <%@ page import="com.vignette.as.client.javabean.Channel" %>
    <%@page import="com.vignette.as.client.javabean.ContentInstance"%>
     <%
     RequestContext rc = PageUtil.getCurrentRequestContext(pageContext);
     ContentInstance theMainInstance = (ContentInstance)rc.getPrimaryRequestedObject();
    // String title = theMainInstance.getAttributeValue("title");
    Object ob=theMainInstance.getAttributeValue("title");
    //Object ob="title";
    String title = ob.toString();
     %>
     
    Thanks
    Jay
  • Its Working 

     

    Quoted Jayaram Ponnusamy on 09/11/2017 01:05 PM:

    Hi Qutub,

    I created a jsp (head.jsp) and placed it in sites.war (vgn-ext-templating) but getting null value only. like Dynamic Portal & Dynamic Site Developer's guide chapter 5.3.1 but it didnt work. Kindly please help

     

    head.jsp (placed it in sites.war)

    <%@ page import="java.io.*" %>
    <%@ page import="java.lang.*" %>
    <%@page import="com.vignette.as.client.javabean.ContentInstance"%>
    <%@page import="com.vignette.ext.templating.util.PageUtil"%>
    <%@ page import="com.vignette.ext.templating.util.RequestContext" %>
    <%@ page import="javax.servlet.jsp.PageContext" %>
    <%@ page import="java.io.*,java.util.Locale" %>
    <%@ page import="java.util.*" %>
    <%@ page import="java.util.ResourceBundle" %>
    <%@ page import="com.vignette.as.client.common.ref.AsLocaleRef" %>
    <%@ page import="com.vignette.ext.templating.util.PageUtil" %>
    <%@ page import="com.vignette.as.client.javabean.Channel" %>
    <%@page import="com.vignette.as.client.javabean.ContentInstance"%>
     <%
     RequestContext rc = PageUtil.getCurrentRequestContext(pageContext);
     ContentInstance theMainInstance = (ContentInstance)rc.getPrimaryRequestedObject();
    // String title = theMainInstance.getAttributeValue("title");
    Object ob=theMainInstance.getAttributeValue("title");
    //Object ob="title";
    String title = ob.toString();
     %>
     
    Thanks
    Jay