Announcing the Global SNUG Board of Directors. Learn more here

Help
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

ESS portal page

allen_pitts
Giga Expert

Hello Chris,

I have managed to create a custom ESS portal page
But I have a question which has arisen as a result of creating the site.

There is one more element I would like to include:
It can be seen at the out of the box ESS portal main page at
https://lhphgtst.service-now.com/ess/main.do

The element is the stripe at the very top that has 'What's New
Welcome <username> Logout AA <search box>

I am trying to find the code that does this tripe.

So I went to the site called Employee Self Service Portal
In the Pages tab, Portal, main page
then Edit Page
The 'Editing Content Page' says the header is 'Portal - Header

The Portal Header says the 'Top menu: is Portal - Super Menu (What's New)

At the form for this Navigation Menu there is a menu Section called 'What's New'
I click on that An it show me the 'Menu Section form' but there is no
code.

Where can the code be found so it can be included in a banner?

Thanks

Allen Pitts
LHP Hospital Group

1 ACCEPTED SOLUTION

Brad Tilton
ServiceNow Employee
ServiceNow Employee

Hi Allen,



You can generate that with something like the following:



<p>


    Welcome, ${gs.getUser().getDisplayName()} <a href="logout.do">Logout</a>


    <form id="content_search" action="content_search.do" method="post" name="content_search">


          <input function="$('content_search').submit();" type="text" id="sysparm_search" name="sysparm_search" />


    </form>


<p>




View solution in original post

3 REPLIES 3

Brad Tilton
ServiceNow Employee
ServiceNow Employee

Hi Allen,



You can generate that with something like the following:



<p>


    Welcome, ${gs.getUser().getDisplayName()} <a href="logout.do">Logout</a>


    <form id="content_search" action="content_search.do" method="post" name="content_search">


          <input function="$('content_search').submit();" type="text" id="sysparm_search" name="sysparm_search" />


    </form>


<p>




Hello Brad,


The code works.
Thanks.


Could not figure out where to put it.
But after a while I tried a Dynamic Content
block I put together to hold a a Javascript
which displays an image randomly chosen
from an array of nine images. The
gs.get code works there.



Thanks again.



Allen Pitts


Hi Allen,



I know that I helped out on a different issue you had and wasn't sure you were addressing me specifically in this post. However, if you want to look at more of the code creating that portion for future reference then instead of following the trail of content blocks associated with a page like usual, you'll want to look at UI Macros for this one. This one is a special case where it's being controlled by a script to run when the "Login" checkbox is checked in a content block header.



contentblockheader.png



The macro you're looking for is named cms_header_login. This will contain the script that renders that "Welcome, <name> Login/Logout" section.



cms_header_login_macro.png