Topic on Project:Support desk

Changing homepage name to site name per $wgSitename value

14
2001:44C8:44C8:6B18:B0B9:2D7D:C2AA:6000 (talkcontribs)

MediaWiki 1.35.2 in Hebrew.

I desire that the <h1> heading of my website's homepage would be the site name as the $wgSitename value, instead the current, default-created, generic heading עמוד ראשי (which I would translate to English as "main page").

I want to achieve that:

  • Without creating any 301 redirect
  • Without installing any addon extension

Is it possible from the core somehow, perhaps by utilizing SITENAME magic word?

Bawolff (talkcontribs)

The page named MediaWiki:Mainpage controls the "name" of the main page. Edit that page.

2001:44C8:44C8:6B18:484F:35FB:CD28:A71C (talkcontribs)

Hello @Bawolff

I think I don't have such a page; from a search on all webpages with מדיה-ויקי: (MediaWiki:) namespace, I got:

  • מדיה ויקי:Cite references link many
  • מדיה ויקי:Cite references link one
  • מדיה ויקי:Common.css
  • מדיה ויקי:Common.js
  • מדיה ויקי:Emailsubject
  • מדיה ויקי:Sidebar
  • מדיה ויקי:Sitenotice

Furthermore, navigating to example.com/MediaWiki:Mainpage brings not found 404.


What should a user do in such a case?

Jonathan3 (talkcontribs)
2001:44C8:44C8:6B18:484F:35FB:CD28:A71C (talkcontribs)

@Jonathan3

In the FAQ there is the section:

How do I change the Main Page title?

Simply click on the "Move" tab, and move the page to the desired page title.

Usually you also want to change which page is the configured as "main page".

This brings me back to the MediaWiki:Mainpage I mentioned above.

2001:44C8:44C8:6B18:484F:35FB:CD28:A71C (talkcontribs)

@Jonathan3 to further clarify my point: After "moving the main page to another name" the logo links to a deleted webpage

Again, I humbly remind that I don't want to use redirects.

2001:44C8:44C8:6B18:484F:35FB:CD28:A71C (talkcontribs)

Okay,

What I did and might have solved this, was to go to Special pages --->>> System Messages and there to search for "mainpage" (without quote marks) and to edit:

  • מדיה ויקי:Mainpage
  • מדיה ויקי:Mainpage-description
  • מדיה ויקי:Mainpage-nstab

I have edited the system message for each one of them to {{SITENAME}} and saved now the logo image points to my "new" homepage with the new name;

I think that the only thing left for me to do is to also edit the sidebar menu link to point to it as well, because it's currently hard-wired to point to the "old" homepage.

Bawolff (talkcontribs)

Just to clarify a previous point, pages starting with mediawiki: (including translations) have a default value even if they don't exist, and you have to create them to change their defaults.


The default sidebar will use MediaWiki:mainpage as the link to the main page (and mediawiki:mainpage-description as the text of the link). Its possible you customized the sidebar to be hardcoded, or maybe some caching is happening, in which case a dummy edit to mediawiki:sidebar might help (or just wait a few days)

2001:44C8:44C8:6B18:F523:B14E:AB6B:5379 (talkcontribs)

@Bawolff if I am not wrong, the original value of the sidebar link was (as in the sidebar edit page):

mainpage|עמוד ראשי

I then changed it too:

mainpage|MediaWiki


It might have been something else than mainpage|עמוד ראשי but I don't recall ever changing it before my action earlier today.

2001:44C8:44C8:6B18:F523:B14E:AB6B:5379 (talkcontribs)

if I am not wrong, the original value of the sidebar link was (as in the sidebar edit page):

mainpage|עמוד ראשי

I then changed it too:

mainpage|{{SITENAME}}

It might have been something else than mainpage|עמוד ראשי but I don't recall ever changing it before my action earlier today.

2001:44C8:44C8:6B18:F523:B14E:AB6B:5379 (talkcontribs)

Added <nowiki></nowiki> tags in my second post.

Bawolff (talkcontribs)

The original value is supposed to be:


mainpage|mainpage-description


It will substitute that for the mediawiki namespace page of that name. If that doesn't exist, it will use the value as specified. See manual:interface/Sidebar for details.

2001:44C8:44C8:6B18:28FD:BC92:A295:3870 (talkcontribs)

@Bawolff

My current sidebar menu pattern is as follows:

* navigation
** mainpage|{{SITENAME}}
** recentchanges-url|recentchanges
** randompage-url|randompage
** CUSTOM_LINK_1
** CUSTOM_LINK_2
** יצירת קשר:טופס|יצירת קשר

* SEARCH
* TOOLBOX
* LANGUAGES

My current system messages pattern is as follows:

  • מדיה ויקי:Mainpage
  • מדיה ויקי:Mainpage-description
  • מדיה ויקי:Mainpage-nstab

All got just {{SITENAME}} as value.

My question

I find my website to work fine, but I misunderstand if in your last post you clue that my website has a problem that I should take care of, so do you think I should change any of the two patterns I just described?

Bawolff (talkcontribs)

If what you have works, keep it

Reply to "Changing homepage name to site name per $wgSitename value"