Custom Page Title

By CallumMcL CallumMcL

Description

In a wiki that I'm a part of, we have very little control over our page titles. If you have a similar issue, the following code should point you in the right direction to create custom titles that can utilize WikiDot text decoration such as colour, weight, and italics.

NOTE: Many wikidots may have different a layout for the page title. The following layout code is only a guide, you may need to fiddle around with it before it resembles your own wikidot's page title layout.

Code

[[module CSS]]
#page-title {
 visibility: hidden;
}
[[/module]]
[!-- THESE LAYOUT TAGS ARE JUST A GUIDE --]
[[div style="width:85%;height:59px;position:absolute;font-size:200%;left:256px;top:63px;border-bottom:#666666 1px solid"]]
Your Text Here
[[/div]]

In action

CallumMcL's Custom Title


Thanks to tsangk for this great snippet: conditional-blocks


text above inserted with:

[[include :snippets:if START |unique=1|type=equal|var1=%%name%%|var2=conditional-blocks]]
**##red|Thanks to tsangk for this great snippet:##** [[[code:conditional-blocks]]]
[[include :snippets:if END]]



Other snippets posted by CallumMcL

Pretty Tables - 29 May 2013 06:14


Rate this solution

If you think this solution is useful — rate it up!

rating: +4
RobElliott RobElliott 29 May 2013 08:46

Don't forget that in ListPages etc it is the original pagename which will be displayed, not your custom replacement.

It would be better for a site admin to relax the permissions slightly in the site manger to allow members to rename pages. But that only affects the url. If you can edit the page and add a CSS module then you have the relevant permissions already to change the page title so I don't really see the need for this snippet.


Rob Elliott - Strathpeffer, Scotland - Wikidot first line support & community admin team.

Last edited on 29 May 2013 08:51 by RobElliott
by RobElliott RobElliott , 29 May 2013 08:46
Don't pad the difference
CallumMcL CallumMcL 29 May 2013 05:44

Sorry guys, don't add the extra div to pad. It's from an older version of the code where the title would float. I don't know how to edit the post.

EDIT: I figured out how to edit the page, and removed the redundant div.


public int a(int c) { b(c); }
public int b(int d) { a(d); }

Last edited on 29 May 2013 06:05 by CallumMcL
by CallumMcL CallumMcL , 29 May 2013 05:44
page revision: 1, last edited: 29 May 2013 06:04
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License
Click here to edit contents of this page.
Click here to toggle editing of individual sections of the page (if possible). Watch headings for an "edit" link when available.
Append content without editing the whole page source.
Check out how this page has evolved in the past.
If you want to discuss contents of this page - this is the easiest way to do it.
View and manage file attachments for this page.
A few useful tools to manage this Site.
Change the name (also URL address, possibly the category) of the page.
View wiki source for this page without editing.
View/set parent page (used for creating breadcrumbs and structured layout).

AltStyle によって変換されたページ (->オリジナル) /