[Paid] Tutorial: How to Turn S2_Bloggish Journal Titles and Subtitles Into Clickable Links

Mar 19, 2008 23:04


There are two elements of good CSS missing from the Bloggish template: one is the ability to have clickable links for entry titles. We remedied that last week by adding special code to our custom theme layer.

This week we're going to correct Bloggish's other missing element: the lack of clickable journal titles and subtitles.
  • Before you get started, you'll need to make sure you have a paid account with a custom theme layer enabled. If you haven't created a custom theme layer yet, see carriep63's instructions here and also check out her tips to ensure you add the layer in the correct order.
  • You'll need to copy and paste the current code you're using in your theme layer into Notepad before you get started in case anything goes wrong.

  • When you're ready, get things "clicking" by pasting the following code into your custom theme layer and clicking Save & Compile.
  1. This code will turn the journal title into a clickable link: function print_banner(Page p) { container_open("banner"); print safe """

    $p.global_title

    """; print safe """"""; container_close(); }

  2. This code will turn the journal subtitle into a clickable link: function print_banner(Page p) { container_open("banner"); print safe """"""; container_close(); }

  3. This code will turn the journal title and the subtitles into clickable links: function print_banner(Page p) { container_open("banner"); print safe """

    $p.global_title

    """; print safe """"""; container_close(); }

Clicking either of those links now returns readers to your home page.

The natural question now is: "Can I change these links to point to another page on my journal, or even to another journal or website?"

The answer is "Yes"! Replace the "$p.base_url" seen in the following code...

"$p.base_url"> $p.global_subtitle

...With any URL that you want. When you're done, your code should look like this...

"http://marahmarie.livejournal.com"> $p.global_subtitle

theme layers, tutorial

Previous post Next post
Up