Public Ticket #1188898
How to change title from "home" to Database name


  • Stuart started the conversation

    How would I go about changing "Home" to the actual name of the Database?

    If I have more than one database, it will get confusing seeing "Home" on both, and the only thing to differentiate them is the colour?

  •  67
    Lee replied

    Hello Stuart,

    Well there's quite a few ways to do it depending on what you are comfortable with...

    1.  Use our output filtering hook to replace with your own php code

    2.  Custom Javascript (backend settings)

    3.  Page indication

    to name a few.

    Keep in mind each database will reside on a separate page so naming the pages after the database name might be something you would want to do.  For example you have 2 databases contacts and leads, setting your pages named the same would give (www.yoursite.com/contacts and www.yoursite.com/leads).  You can also set the footer to reflect the current database as well.

    If you must change it from Home to something else, probably the easiest way is using Javascript and here's an example...

    var d = jQuery('.wcp-breadcrumb');
    d.text(d.text().trim().replace(/Home/i, "New Name"));

    Where New Name would be the name you want to use.  You would set this in the backend settings for the current database you want to change.

  • Stuart replied


    Thank you for highlighting some solutions.

    Using your Custom Javascript, is there a way to use the page name where the database resides instead of a static hard coded name?

  •  25
    Avinash replied

    Hello Again,

    You have to use php code there. You can use <?php echo get_the_title(PAGE_ID) ?> page or post id which you want to use in place of PAGE_ID.

    It will only work if you're doing in php file in between  <script> tag.

    Otherwise you have to use hard-coded.

  •  1
    mikeb1319 replied

    The java script solution is ok, but not brilliant. A better solution would be a settings option for a Front Page Title that appears in the space between the color band where the Home and Menu links are located and above the column titles. This would be particularly useful for filtered lists since printing the screen produces a reasonably useful report if there are not too many columns on a page. Probably not the correct place for it but this would be a wish list item for me. See the attachment for an idea visualized. This is possible, but very time consuming and tedious without the proper tools - ie, title settings option.

    Attached files:  Ride Cmte.pdf