user2855 Developer Fra India Medlem siden mar. 2016 user2855 mai 30 2017 05:22 a.m. Hello Tim,I have 3 templates setup in my litecart, what I want to achieve is setup 3 separate titles for login page.Where do I place the following code?document::$snippets['title'] = 'custom title here';document::$snippets['description'] = 'custom description here';I placed the above code in pages\login.inc.php but it is affecting all layouts.I placed the code in templates\mycatalog1.catalog\views\box_login.inc.php In both instances overall site template title and description are displayed.Please advise
tim Founder Fra Sweden Medlem siden mai 2013 tim mai 31 2017 11:38 p.m. It can be placed in the view but turn off cache as views are cached and will not remember variables set in them.Or you can provide a switch statement:switch (document::$template) { case 'one.catalog': document::$snippets['title'] = 'custom title here'; document::$snippets['description'] = 'custom description here'; break; case 'two.catalog': document::$snippets['title'] = 'custom title here'; document::$snippets['description'] = 'custom description here'; break;}Or you can insert a dynamic translation: document::$snippets['title'] = language::translate(document::$template . ':custom_title', 'custom title here'); document::$snippets['description'] = language::translate(document::$template . ':custom_description', 'custom description here');That is if document::$template is set before you run your conditions.