Personal customisation of page title using liquid

Hello all,
I am looking to customise the title of the webpage so that the top of the browser window will be personalised based on a parameter passed through the url.
I am trying this:
        {% for listing in MDListings.items %}
        {% if {{globals.get.MID}} == {{listing.itemid}} %}
        {% assign pagetitle = {{listing.name}} %}
        {% endif %}{% endfor %}
        <title>{{pagetitle}}</title>
When I insert it into the <head> portion and update the page, the whole chunk will move to the body automatically.
When I run the liquid script in the body the output is fine.
So my question is, how do i change the page title using liquid? Or is there another way to do so if liquid is not needed/recommended?
Would someone enlighten me about this? Thanks!!

Hi Liam,
What I'm trying to do is to display a webapp on a custom page NOT using the module_webapps detail layout. This is because I need to produce results from 2 different categories and I'm using a connector webapp to link the categories to the webapp listing.
        {module_webapps id="" render="collection" collection="MDListings" template="" filter="all"}         {module_webapps id="" render="collection" collection="MDCategories" template="" filter="all"}         {module_webapps id="" render="collection" collection="MDConnectors" template="" filter="all"}         {% for listing in MDListings.items %}                {% if globals.get.MID == listing.itemid %}                   {% assign pagetitle = listing.name %}                                     {% endif %}         {% endfor %}        OR         {module_webapps id="" render="collection" collection="MDListings" template="" filter="all"}         {module_webapps id="" render="collection" collection="MDCategories" template="" filter="all"}         {module_webapps id="" render="collection" collection="MDConnectors" template="" filter="all"}         {% for listing in MDListings.items %}                {% if globals.get.MID == listing.itemid %}                   {% assign pagetitle = listing.name %}                  {% endif %}         {% endfor %}          
So this content here is inside the html file that I have which I am going to use as the custom page for displaying the listing. I'm extracting the ID through the URL, then searching through the webapp list for the specific item, then extracting the information from that item.
I can extract those information easily, however I want to make use of the name of that item and modify the page title which will change the browser page name. However when i do it in the above method, the browser will display {{listing.name}} in the first method and {{pagetitle}} in the second.
I'm wondering if i am doing this correctly, or is there an easier way to do whatever I'm doing?

Similar Messages

  • Feature Request: Set a hosted gateway page title using the IDK

    Hi Folks,
    I'd like to have a method added to the IPortletResponse interface called setPageTitle(String pageTitle) that would set the browser title bar to the String pageTitle.
    This is extremely important for SEO and for usability (because if you minimize a bunch of browser windows pointing to hosted gatway pages, they all say "Gateway" and you have no idea what the bleep is actually in those windows).
    Thanks!
    Chris Bucchere | bdg | [email protected] | www.bdg-online.com

    This is possible using the title attribute of the displaymode tag. See http://edocs.bea.com/alui/devdoc/docs60/References/API_Libraries/TagDocs/standard/displaymode.html for more info.

  • Need to add a link on Page title bar

    HI,
    Can i know how can i add a link on page title bar.
    When i click on that link, it should open  a page in a separate window.
    Regards,
    Raju

    Hi,
    i am talking about portal only.
    once you login, you can see history, back and forward links on top of page title bar.
    Now i need to add one more link just beside history.
    Can you please give me brief idea on customisation of page title bar.
    Regards,
    Raju

  • How can I save the web page by using the Page Title as the file name ?

    When i use Internet Explorer ,I can save the web page by using Page Title as the file name(as default no need to adjust anything). But when i use Firefox ,It can not use the Page Title to save as the file name. How can I do that like in Internet Explorer?

    See:
    *File Title: https://addons.mozilla.org/firefox/addon/834
    *Title Save: https://addons.mozilla.org/firefox/addon/712

  • Change the Page title of Default.aspx in SharePoint Hosted App using ECMA Script

    Basically i want to change page title dynamically. the thing is default.aspx page is present in the below location
    Folders/Pages/Default.aspx ( Verified using
    SharePoint Manager 2013 Online )
    Could any one let me know how to iterate through the folders and then go to pages and change title of Default.aspx page?
    Navaneeth

    All the links which is mentioned above is either they are doing it in code behind or javascript like document.title.
    I want to change dynamically using ECMA script. the point i found here is if you use the below code you will get an error saying list "Pages" does not exists in the SharePoint site.
    clientContext.Web.Lists.GetByTitle("Pages");
    So i am wondering how can we change the page title of SharePoint hosted app ( Default.aspx) dynamically
    Say example i have one text box and submit button. when give the title in the text box and click on submit  the title should reflect in the page.
    Navaneeth

  • Can a library item be used to personalize a page title?

    Hi, I do not think this is possible, but is there a way to use a library item to personalize part of a page title? Thanks in advance, Mark

    In that case, you should have your <title> tags within a Template Editable Region so you can use a unique title on every page.
    In addition, you should make good use of Heading tags <h1> <h2> and <h3> within editable regions to promote keyword rich content that tells search engines & humans what your pages are about.
    Google's SEO Starter Guide (PDF)
    http://www.google.com/webmasters/docs/search-engine-optimization-starter-guide.pdf.
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    www.alt-web.com/
    www.twitter.com/altweb
    www.alt-web.blogspot.com

  • Site Index using Page Titles

    I'm wondering if there is a way to generate a site index that displays page titles instead of the full url. I'd like to provide a page that lists a site index in such a format. I have a php site with over 300 pages. Is there a tool out there for this? I already reset the default sitemap to TRUE - using Dreamweaver CS5.5, but the map view says I have to specify the homepage?? What do the experts suggest here?
    Many thanks - I always value the input from this forum.

    Easy. Create a PHP function file_get_contents and pass the URL of the page you'd like to grab the title for.
    Do a regular expression match for <title></title> and grab the contents.
    Echo it in your HTML.
    Here's a code you can use:
    <?php
    function returnTitle($Url){
        $str = file_get_contents($Url);
        if(strlen($str)>0){
            preg_match("/\<title\>(.*)\<\/title\>/",$str,$title);
            return $title[1];
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Title generator</title>
    </head>
    <body>
    <?php echo returnTitle("http://www.google.com/");?><br>
    <?php echo returnTitle("http://www.adobe.com/");?><br>
    <?php echo returnTitle("http://www.microsoft.com/");?><br>
    <?php echo returnTitle("http://www.apple.com/");?><br>
    <?php echo returnTitle("http://www.forums.adobe.com/");?><br>
    <?php echo returnTitle("http://forums.adobe.com/message/4917208#4917208");?>
    <!-- Add more (as many as you'd like!) URLs here-->
    </body>
    </html>
    Name the file .php and run it from MAMP/ WAMP or on a webserver.
    -ST

  • FF4 bookmark all tabs uses url, not page title, as title

    In Firefox 4 the "bookmark all tabs" command (ctrl+shift+D) does not save the page title as bookmark title which Firefox 3 did. Instead, Firefox 4 uses a part of the URL as bookmark title.
    That makes it very hard to find bookmarks using search.
    Is that change a bug or intended?
    If intended, is there some option to revert to the Firefox 3 behaviour?

    I found out that there is a bug report for this filed here:
    https://bugzilla.mozilla.org/show_bug.cgi?id=446171
    The bug is caused by certain Firefox settings as described in comment 8 on that page. All we who wish to keep those settings can do is wait for a fix in some upcoming version of Firefox.

  • Is it possible to add the page title to the menu bar?

    Does anyone know of any addons that allow you to add the webpage title to the menu bar? I already took a look at the addon Personal Titlebar, which purports to add the menu bar onto the title bar, but had no luck getting it to actually do what it advertised.
    I like the way the menu bar looks beside the orange Firefox button, but would also like to be able to see the full page title in the blank space between "Help" and the title bar buttons (min/zoom/close). I don't want to enable the actual full title bar. That would be a waste of space.

    That creates a title bar on top of the existing menu bar, which is what I want to avoid. I was hoping someone had created a way to combine the two easily, rather than having them exist as separate bars using double the screen real estate and leaving giant unused areas.
    I was hoping for something more like what I mocked up in the included image. The top is with the title bar enabled, the bottom is the preferred result.

  • Who Will Be the First to Tweak IE9 To Restore the Page Title into the Title Bar?

    It's a well-known fact that if you disable the tabbed view (i.e., you prefer to use multiple separate windows for your browser pages) the Page Title from whatever web page you visit doesn't show up anywhere.
    How does a blatant omission like this pass a design review?
    It's like someone at Microsoft doesn't think titles belong in Title Bars any more.  Who is this person, and do they actually USE a computer?
    In a similar vein, Windows Explorer windows no longer put the path in the Title Bar -
    unless you use one of the fine aftermarket products such as ShellFolderFix or ClassicShell to restore the Title Bar to service.
    Has anyone figured out yet what to tweak to put the page title in the Window Title Bar for IE9?
    -Noel

    I see I just got another up-vote for the original post in this thread.
    Perhaps it's time to follow up...
    TODAY, with Windows 8.1 and IE11, we see that you can no longer eliminate tabbed view.  Thus there is a place - at the expense of some space for the address bar, where the page
    title appears.  But it is not the Title bar, and it's usually not wide enough to fit the whole title.
    Why is Microsoft continuing to choose to do ANYTHING but follow their own desktop usability standards? 
    We see the ongoing departure of application design from standards not only in IE, but also in Office and other Microsoft applications.
    Hey!  We users didn't designate that space across the tops of windows as a title area.  Microsoft did.  We just got used to using it.  When we look to activate the proper window on our desktops, we look at the titles.  Fortunately,
    there are 3rd party developers who make programs to put the right things back, but I'm forced to ask:  Why?  This is not an accident.
    Are we being groomed by Microsoft to become used to and ultimately begin to accept random UI design?
    Microsoft engineers, are you being instructed to make your designs less conformant to desktop usability standards by your bosses?  If so, you need to tell them to kiss your collective asses!  You're not doing your products any favors by following
    such ridiculous advice, and as your products go so will your company.  You are not too big to fail!
    People will only allow themselves to be manipulated for so long.  Then you'll find some other company has made a product that's better (something you're
    facilitating by making your product worse) and is eating your lunch.
    Have a nice day in Redmond.
    -Noel
    Detailed how-to in my eBooks:  
    Configure The Windows 7 "To Work" Options
    Configure The Windows 8 "To Work" Options

  • How to display addtocart button using Liquid

    I'm trying to output a custom layout of a product using Liquid, but can't figure out how to display the add to cart button as it's not included in the JSON. Liquid markup is all new to me so forgive me if I'm missing something obvious. Here is what I have for the layout but need an addtocart button.
    {module_product template="" collection="Classes" render="collection" catalogId="277528" productId="9231800"}
      <h1>{{Classes.title}}</h1>
       {{Classes.description}}
       <h3>Cost</h3>
       <p>{{Classes.saleprice}} + {{Classes.taxCode}} {{Classes.custom1}}</p>

    Ahh, Your rendering a product on just a page as a collection. May I ask why your trying to do that? Why are you not using the product eCommerce layouts.
    Doing what your doing you will only ever display information. You will never be able to do grouping, attributes or anything like that because they are more then just data output, they have functionality, BC script features and more to run off.
    Unless you 100% know how and you had all the info available (which you dont yet) to completely replicate every BC script feature etc - You will not be able to do what your doing.
    Liquid runs in layouts, just use product layouts and do things in there. I not seen on that page any reason why you would not be.

  • Page Title and Navigation Panel

    The title toolbar is able to display the page title of the current page.  I would like to display the page title automatically within the wpc template so I was wondering if there was some sort of session variable I can use that will display the title?
    Also I would like the Navigation panel to open to the width of the longest iView rather than the longest DTN Item - is it possible to set it to do so?
    Edited by: TA on Oct 23, 2008 9:31 PM

    It's resolved. I think that user was not assigned to personal number in R3.

  • How to you change a page title in iWeb?

    Not the page name, the title that appears at the top of the page when loaded.
    It seams to grab random text to use as the page title
    Example: the page title here is "Apple - Support - Discussions - Post Message: Thread"
    The page name could be Joe for all we know.

    I believe if you put some text in the page heading box on your page then that will be used as the title that appears at the top of your browser window. Whenever you start a new page you'll notice that as well as default pictures and body text boxes there is a page heading.
    Message was edited by: Flynn

  • How to change the web page title of a web dynpro app?

    Hello,
    I would like to change the HTML page title of a web dynpro application without renaming the application component itself - but how?
    Thanks for your comments!

    Hi M Walter,
    Assuming you are using Web Dynpro Java, you can change the title of the Web Page for Web Dynpro App by adding the title to the main window of your app.
    Go to Windows and open the properties. There will be a field called 'title'. Give the title you want, save, build, DC->Build and deploy.
    The title you gave to this Window will be displayed as the title of your Web page.
    Regards,
    Ajay

  • Changing page title based on a value

    Just curious if it is possible to change the page title based on whether or not an item is null. If it is how?
    For example page title:
    If PX_ID is not null, the page title is View/Edit PRODUCTS.
    and
    If PX_ID is null, the page title is Add PRODUCTS.
    I know its no big deal... its not that hard to copy the page.
    Thanks ,
    Derek

    Set your page title to something using the &P101_PAGE_ITEM. syntax.
    Then you can use whatever logic you need to devise your P101_PAGE_ITEM.
    Ben

Maybe you are looking for

  • Is there a way to create an endless loop of one playlist?

    I have a playlist where I would like to create an endless loop. Is there a way to accomplish this task? Software Version 1.2. Someplace I read about going into Settings and down to "repeat" and selecting "all." The settings on my iPod Nano does not s

  • New fields for query with logical DB AFI

    Hello, I'm trying to change a Query (SQ01) that uses an infoset that gets the data from a logica DB (AFI), and I would like to include some fields that are not in that logical DB (VIQMFE-OTGRP, VIQMFE-OTEIL, VIQMFE-FEGRP, VIQMFE-FECOD). Any idea or m

  • Nokia N8, Camera Issue: Black spot

    Saw others have had the same issue.. and tried the "solutions" Black spot in same location on every picture / live preview of the image on the camera mode. tired cleaning the lens, does not work. Guess its a hardware problem/ faulty lens? need a bit

  • How to transfer images from windows pc to iphone 5s

    I want to add my old photos from my windows pc to iphone 5s. Please give the solution. Thank you.

  • Activating BC sets

    In which client should BC sets be activated? This is our environment: SolMan Development:  SMD client 001 SolMan Production:  SMP client 001 Which client should the BC set be activated in 000 or 001? It is not clear from note 903528 if we are suppose