Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

[SOLVED] How to change the browser title 10 Jun 2013 13:07 #7410

I have tried many of the proper methods suggested by joomla for setting the browser page title, but none seem to work in a j-cook component. please could somebody give me an idea how to go about this in j-cook component? currently the page title is displayed as "Web Address - JADMINISTRATION - Component Name" i need to be able to set my own custom versions of these so as to be more in-keeping with the rest of my site. as far as i can tell from the official joomla documentation it is set in the view.html.php file and is the lines which read:

$document = &JFactory::getDocument();

$document->title = $document->titlePrefix . JText::_("ACCOMMODATION_LAYOUT_ACCOMODATION") . $document->titleSuffix;

But alas any changes to these lines results in no change of the title on the page. please can someone help?

Please Log in or Create an account to join the conversation.

Re: How to change the browser title 11 Jun 2013 18:51 #7430

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
I don't know what to say...
Desactivate plugins, or something else ???

Works for me. There is not issue here.
$document	= JFactory::getDocument();
$document->title = 'My title';
Coding is now a piece of cake

Please Log in or Create an account to join the conversation.

Re: How to change the browser title 13 Jun 2013 09:45 #7458

Hi so after a lot of cursing it turns out that it is the line which reads:

JToolBarHelper::title(JText::_('BUSINESSDIRECTORY_LAYOUT_BD_CATEGORIES_ITEM'), 'businessdirectory_bdcategories');

That stops the title from changing. if I comment out this line it is able to propagate to the title I have defined with

$document = &JFactory::getDocument();
$document->title = 'Business Directory';

also adding these lines after:

JToolBarHelper::title(JText::_('BUSINESSDIRECTORY_LAYOUT_BD_CATEGORIES_ITEM'), 'businessdirectory_bdcategories');

also stops the problem. Sorry this was probably really obvious but it took me a fair while to work it out. hope this potentially saves someone else some time. Thanks for the reply though admin.
The following user(s) said Thank You: twev, molenwal1

Please Log in or Create an account to join the conversation.

Re: How to change the browser title 22 Jun 2013 14:21 #7612

Thanks for leaving this information on the form. Had same issue, isn't this a bug? The toolbarhelper is changing the title after setting the title at the start of the display function in the view.html.php
Molenwal1 Webdesign
www.molenwal1.nl

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Time to create page: 0.198 seconds

I jumped and started to work on a demo component... but 2 days later this demo component became the real component. I just showed today the end result to my customer and he turned to me and said... "this is more than I expected"... All of this is because Cook did cut about 70% of my work and provided me more ways to improve the usability of the component. The end result was 17 tables all related between than to generate a full dashboard for the travel agents. Thanks for Cook developers for such great tool. This component would not be possible to be done at short time with all the features in it
Griiettner (Forum)  

Get Started