with a setting

ellen.donovan's Avatar

ellen.donovan

02 Nov, 2015 03:53 PM

I have created a new site and I sharing a common files folder.

I need help with rending our out the title on the pages. If some one could screen share it would be great. I know it's something simple that I'm missing.

Thanks,
Ellen

  1. 1 Posted by Ryan Griffith on 02 Nov, 2015 06:49 PM

    Ryan Griffith's Avatar

    Hi Ellen,

    To clarify, are you referring to outputting the title of a page within it's content/markup or a <title> tag within the <head> section of the page's HTML?

    In general, you can accomplish this with a Format or by placing the <system-page-title/> system tag within your Template.

    If you want to go the Format route, you can accomplish this by:

    • Velocity: simply add $currentPage.metadata.title
    • XSLT: apply a calling page index block to the region along with a Format similar to:
      <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
      <xsl:template match="/system-index-block/calling-page/system-page">
          <h1><xsl:value-of select="title"/></h1>
      </xsl:template>
      </xsl:stylesheet>
      

    Please let me know if you have any questions.

    Thanks!

  2. 2 Posted by ellen.donovan on 02 Nov, 2015 07:10 PM

    ellen.donovan's Avatar

    [cid:5CBBB086-B4EA-43D5-9F8A-731BD7619D1C]
    Thanks,
    Ellen

    Ellen M. Donovan
    Salt Lake Community College
    Web Developer | Web Designer | Web Services | Workfront Administrator

    801-957-4655<file://localhost/tel/801.957.4655>
    [email blocked]<mailto:[email blocked]>

  3. 3 Posted by ellen.donovan on 02 Nov, 2015 07:14 PM

    ellen.donovan's Avatar

    Hi there,

    Can we do a screen share? It is something else.

    Thanks,
    Ellen

    Ellen M. Donovan
    Salt Lake Community College
    Web Developer | Web Designer | Web Services | Workfront Administrator

    801-957-4655<file://localhost/tel/801.957.4655>
    [email blocked]<mailto:[email blocked]>

  4. 4 Posted by Ryan Griffith on 02 Nov, 2015 07:39 PM

    Ryan Griffith's Avatar

    Hi Ellen,

    Generally when you are seeing the literal code output to the page, Velocity encountered an issue when attempting to execute it. In this case, I would verify:

    • The $page variable is being set correctly
    • Your page has content within the Display Name metadata field

    Also I wanted to mention it would be better to use $_EscapeTool.xml($page.getChild("display-name").value) instead of the Serializer Tool since you're only working with a text field and not a WYSIWYG field.

    If you would like, feel free to attach your Format and I would be happy to help take a closer look.

    Please let me know if you have any questions.

    Thanks!

  5. 5 Posted by ellen.donovan on 02 Nov, 2015 08:57 PM

    ellen.donovan's Avatar

    It works on all my sites. It is not working on my new site? So I think the code is correct. I think it’s a setting.

    Anyway to do a screen share? It would make it go much faster and I can show you where it is working and not working.

    Thanks,
    Ellen

    Ellen M. Donovan
    Salt Lake Community College
    Web Developer | Web Designer | Web Services | Workfront Administrator

    801-957-4655<file://localhost/tel/801.957.4655>
    [email blocked]<mailto:[email blocked]>

  6. 6 Posted by Ryan Griffith on 03 Nov, 2015 12:45 PM

    Ryan Griffith's Avatar

    Hi Ellen,

    Definitely sounds like there is a missing piece. My scheduled is pretty open today, let me know when would be a good time to set up a quick screenshare.

    Thanks!

  7. Ryan Griffith closed this discussion on 19 Nov, 2015 03:29 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac