BlogHarbor Home Page
FAQFAQ  SearchSearch  MemberlistMemberlist  UsergroupsUsergroups  UsergroupsRSS   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
Post title a link?
 
Post new topic   Reply to topic    BlogHarbor Community Forum Index -> General Discussion
View previous topic :: View next topic  
Author Message
sgarfield



Joined: 07 Jan 2005
Posts: 18

PostPosted: Sat Jan 08, 2005 10:50 am    Post subject: Post title a link? Reply with quote

Is there a way to make the post title a link to the post?
Thanks,
--Steve
Back to top
View user's profile Send private message Visit poster's website
john
Site Admin


Joined: 16 Mar 2004
Posts: 3434

PostPosted: Sat Jan 08, 2005 1:21 pm    Post subject: Re: Post title a link? Reply with quote

Yes, there is a way... It's going to seem a bit complex, but if you can follow along with these steps you should be able to make this, and many other design changes to your blog.

We're going to need to modify the category template of your blog.
  1. Login to your Blog Admin Control Panel through the Login page.

  2. Click on the Look and Feel tab, then the Templates subtab.

  3. Now you see a list of the Templates you can customize. We are going to customize the category template, which controls structure of the content when in category view, so click Edit in the row that begins with the word category.

  4. Now you'll be on a page listing the current styles - there will probably be only one, so click the Customize button at the bottom of the page.

  5. One more step, as succinctly as I can; you'll be on a page where you see an option to "Copy a pre-defined style to your staging area", click the Go button.

  6. Now you're finally at the page where you can modify the category template..

Scroll through the textarea labeled Staging Template Content and look for this:

Code:
{{if title}}
{{title}}
{{else}}
Untitled
{{/if}}


That right there is the macro language that builds the title of your articles when you are in a category. It says, if there's a title, show it, otherwise use the word Untitled as the title.

Select that text and replace it with this:

Code:
{{if title}}
   <a href="{{view_url}}">{{title}}</a>
{{else}}
   <a href="{{view_url}}">Untitled</a>
{{/if}}


and click on the Save and Activate button. Now open a new browser window or tab and you will see that all of the articles in your category views will be shown with titles linking to the Permanent Link of that article.

All set. But maybe you're saying to yourself, if the article is showing the full text already, I don't want to the title to be a link. Only if there's an excerpt do I want the title to be a link. If that's what you're saying to yourself, then use this code:

Code:
{{if excerpt}}
   {{if title}}
      <a href="{{view_url}}">{{title}}</a>
   {{else}}
      <a href="{{view_url}}">Untitled</a>
   {{/if}}
{{else}}
   {{if title}}
      {{title}}
   {{else}}
      Untitled
   {{/if}}
{{/if}}


and then you can stop talking to yourself; your titles will link to the Permanent Link only when they are excerpted articles.

One last thing, you may need to alter your style template (as we just wrote about yesterday here) a bit depending on the Color scheme you're using. On some of the themes, the link color in the title might default to the same color as its background, making your titles disappear. In that case, you would want to add some code like this to your style template:

Code:
.articleTitle a,
.articleTitle a:link,
.articleTitle a:active,
.articleTitle a:visited,
{
    color: #000;
}


Replace the 000 with the hex of the color you want to use for the title (probably the same as the .articleTitle color).

Hope this gets you started, yes it was a bit complex for what might seem like a small change but with this as a background you should be able to see how your blog's design can be extensively personalized.


Last edited by john on Wed Mar 02, 2005 1:51 am; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail Visit poster's website
sgarfield



Joined: 07 Jan 2005
Posts: 18

PostPosted: Sat Jan 08, 2005 1:45 pm    Post subject: Thanks. Reply with quote

Thanks.

Now I'm saying to myself oh oh, since I can now see that I wrote the question incorrectly.

What I meant to ask was:

Is there a way to make the post title a link to an external page?

In blogger, when you post, you can enter a blog post title and a URL.

Sorry I wasn't clear, but your previous explanation showed me a doorway into doing more with blogware.
Back to top
View user's profile Send private message Visit poster's website
john
Site Admin


Joined: 16 Mar 2004
Posts: 3434

PostPosted: Sat Jan 08, 2005 2:42 pm    Post subject: Re: Thanks. Reply with quote

Now I am saying to myself, and you, and anyone else, that we don't do things that way. Wink There really is not any way to do that on a per-post basis within our system. In our model, the title of the post is associated with the post and its own permanent URL, but not as representing external URLs.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Search all BlogHarbor support resources.
View previous topic :: View next topic  
Display posts from previous:   
Post new topic   Reply to topic    BlogHarbor Community Forum Index -> General Discussion All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum