Custom Page Title
-
@psychobunny Any news on this? I don't want "Home" in there as well. Thanks!
-
I must have missed that setting also?
Site Title and Title Layout
Should i set this " {pageTitle} | {browserTitle}" to {browserTitle} ??? Or how should it be used?
I want to keep pageTitle on all the other pages and change the home part on the startpage!
Any other vars except
{pageTitle}
{browserTitle} -
I guess we will need to stick to Home if we want pagename | *
-
Hi. I`d try
if (req.path === '/api/' || req.path === '/') { meta.config.browserTitle = '{browserTitle}'; config.browserTitle = meta.config.browserTitle || meta.config.title; meta.config.titleLayout = '{browserTitle}'; config.titleLayout = (meta.config.titleLayout || '{browserTitle}').replace(/{/g, '{').replace(/}/g, '}'); }
in src/controllers/api.js where meta configs defined - but it doesn't work( where I can change core files to modify "Home | " from index page? than i'd try
if (req.path === '/api/' || req.path === '/') { config.titleLayout = (meta.config.titleLayout || '{browserTitle}').replace(/{/g, '{').replace(/}/g, '}') .replace(/|/g, '').replace(/|/g, '').replace(/\|/g, ''); } else { config.titleLayout = (meta.config.titleLayout || '{pageTitle} | {browserTitle}').replace(/{/g, '{').replace(/}/g, '}'); }
after "home": " " in pages.json but I had only "| NodeBB"
also I saw https://github.com/julianlam/nodebb-plugin-canned-responses/blob/master/library.js and your hook addTitles but I dont understand how can i modify <title> on main page with this hook after I choose it with titleMatch = /^/api/$/ or titleMatch = /^/$/
thanks. -