Browser page title in Joomla 3.3.4 - browser

i have got following problem with Joomla! 3.3.4: after entering text to the Browser Page Title window in article options, the title doesn't change. In that place is only displayed the global sitename. In older Joomla everything works properly.

To change the field title you need to edit the menu item options. When you go to the detail view of menu item in question, navigate to the Page Display tab. The first field is Browser Page Title, enter the title you want to appear and save.
That should sort it out for you...

Please try to switch to the default template and if it works there is something wrong with your template.
In order to set browser title you could use setTitle() method.
<?php
$this->setTitle( $title );
?>
You could check setTitle usage at: Joomla Docs.
If you want to set title in article template you could make an addition to:
/templates/*template_name/html/article/default.php
An example code that could set the article title to browser title would be:
<?php
$this->setTitle( $this->item->title );
?>
Hope this helps

Go to Global Configuration -> Site -> Include Site Name in Page Titles and set it to Before or After. Of course you also have to set a Site Name.

Related

How to change Default Page Title Field in Kentico

In the Page Type area, the "Page name source field" is set to ProjectCode, which I want. However, my page titles seem to be set up as "'Page name source field' | Website Name", which I do not want.
Is there a way to change the page title structure for that page type so it pulls from a different field on the page type?
In this instance, this is managed in the Settings of the site rather than at a page level.
Navigate to Settings > Content in the Settings application. Then, under the Metadata section, you will find a setting called Page title format.
You can either remove {%prefix%} -, or set a more desirable value in the Page title prefix setting.
In addition, you can change the value for the Page title in the Metadata tab for the document and make it use a macro, such as {% CurrentDocument["ProjectID"] #%}. Also, looking at your notes, you could change your page type so that the Project ID is treated as the document title maybe?
Settings > Content has the Page Title format.
{%pagetitle_orelse_name%} will pull the name of the document or the set page title on the metadata tab of the page.

change page template based on querystring

I am using one page template which contains master page layout also. Now when i access the page having layout which is displaying in browser. Now i wanted here if i use querystring like below:
http://localhost/Mywebsite/page?AppMode=true
then i wanted here to show only content of the page master layout should not be displayed with page content.
Currently i am using Kentico9.
A page's template is not something you can do with a macro, however you can control a Page Placeholder webpart with a macro/querystring.
So in order to do what you want, this is what you'll need to do.
For the page's actual template, it will pretty much just be a 'blank' page template, with a Page Placeholder webpart in it.
For the page placeholder webpart, set the path to "." (so it shows this page), and the Page Template you can then set with a macro: {% (Convert.ToBool(QueryString.AppMode, false) ? "NotAppModeTemplate" : "AppModeTemplate") %}
Tell me if that does the trick for ya! The only caviote is the only 'control' of the master template used is in the template settings, which can inherit the root or the nearest master template, so if you want one template to use 1 master page, and the other to use a different, you'll have to set the masterpages somewhere in their ancestry and then use the "Inherit from Level 0,1,2..." setting in the Page Template.
Assuming you're doing this using Kentico's ASPX mode of development. Do a simple check for the querystring and set the visibility of the placeholder in code behind. If I were doing this in Portal mode, I'd do that with a macro on a webpart.
I used in master page template conditional layout and that layout i used visible property with macro querystring with my condition except for my content place holder and it is working fine as i wanted.

OrchardCMS, how to set HTML title tag to page title

How does one dynamically set the HTML title tag on a page in Orchard?
I have a custom theme, and out of the box Orchard sets only the sitename as the page title.
looking in the Document shape, i see this
<title>#Html.Title(title, siteName)</title>
So for example, if my site is called "MySite" and my page is called "MyPage", the title should be
<title>MySite - MyPage</title>
There is another question that seems to deal with a similar issue, though it references a Title Override module as the answer. This module no longer works with newer/current versions of Orchard.
Alternatively, I've considered just using javascript to set the title, but
a) I don't know how to get a handle on the page title and
b) I don't know which shape in which I would do this
thanks in advance
#Html.Title is just a helper, for which you can find the source code here: https://github.com/OrchardCMS/Orchard/blob/6720b71cf3474a9a7b8a8cc9a99d58b1e733acfa/src/Orchard/Mvc/Html/LayoutExtensions.cs
As you can see, it takes a variable number of parameters. If you omit the site name in your call, it won't get output.
<title>#Html.Title(title)</title>
Note that you could also simply do <title>#title</title>.

Custom information pages not using SEO friendly URLs in OpenCart

I am having issues with the opencart layout override feature. I have created a new information page and I set the layout override to "test". The route for this layout is "information/test". The controller is in the right place, as is the template. I gave the new page the seo-friendly url of "test-page".
My issue is that if I type in "domain.com/test-page" it will get there, but it uses the regular information layout instead of my customized test layout. I can type in domain.com/index.php?route=information/test&information_id=119 and it will now show the page with the right layout.
Is there a way to have it go the customized layout page (domain.com/index.php?route=information/test&information_id=119) when I type in the seo-frindly URL that I created when I created the new information page.
My issue is I am trying to add a carousel to just one information page, while still using seo-friendly URLs.
actually what you coded in template file test.tpl is not a layout, its actually a page accessed using test.php controller , and that page can be opened by accessing url domain.com/index.php?route=information/test&information_id=119 as you already mentioned.
How to create layout then ?
You have already created layout named test by going to System >> Design >> Layouts, now go to module carousel and a module to test layout at say content-top , set your test-page layout override to test and now go to domain.com/test-page and you will see carousel at the top, this is how layout works. what you previously doing was creating a new page by duplicating information controller and template.
A similar discussion on opencart forum Here

Hide username and date in Drupal page

I need to make a completely blank page in Drupal. If I don't give body of the page then it is showing the username and date as must. Is there any way to hide this information?
Or can I get the method which generates the contents of a page?
Thanks
Yes, you need to go to the admin panel. In Site building->Themes->Configure->Global Settings there's a box titled "display post information". Tick or untic the content types where you want to show/hide the info.
If you want to do it the hard way, then yes, there is a way of doing it in PHP. In your theme code, you can create a template for either your content type or even an individual page (node-24.tpl.php, where 24 is your node's NID). There, you can write anything you consider necessary, like:
<?php
echo "<h2>$title</h2>";
echo $content;
This will display only the page title and the page body, with no additional sweetness whatsoever :).

Resources