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 
add email or other text to every post
 
Post new topic   Reply to topic    BlogHarbor Community Forum Index -> General Discussion
View previous topic :: View next topic  
Author Message
cmskherrmann
Guest





PostPosted: Thu Mar 10, 2005 10:25 am    Post subject: add email or other text to every post Reply with quote

Hi John,

I'd like to start listing my company's email address at the bottom of every post and would like to set up my template so it's automatically inserted. Can you tell me how?

kathy
Back to top
john
Site Admin


Joined: 16 Mar 2004
Posts: 3434

PostPosted: Thu Mar 10, 2005 11:13 pm    Post subject: Re: add email or other text to every post Reply with quote

You'll need to modify the article and category templates. The article template controls what an article looks like when its displayed by itself as the Permanent Link, and the category template controls what the list of articles looks like in category view.

To modify the article template for example:
  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 article template, which controls the look of an article when it appears by itself (on its permanent link) and not on a category page, so click Edit in the row that begins with the word article.
  4. Now you'll be on a page listing the current article templates (there will probably be only one). Go all the way to the bottom of the page and click the Customize button.
  5. Click the Go button to Copy the Standard template to the staging area. You'll come to the page where you can customize the article template.
Look at the Staging Template Content box, the lower box, and look for this code:

Code:
<div class="articleBody">{{body}}
</div>  <!-- article -->


As an example, you could change it to this:

Code:
<div class="articleBody">{{body}}
</div>  <!-- article -->
<div style="margin-top:8px;margin-bottom:25px; border-top: 1px solid #bbb; border-bottom: 1px solid #bbb;padding:3px;">
Please contact us at this email address: email@example.com.</div>


Click the Save and Activate button at the bottom of the page, and your articles will all show this new text at the bottom of the article.

Now let's modify the category template. My suggestion would be to add this special footer only for articles that are displayed as full text in category view, i.e. articles which do not have an excerpt.

Repeat the steps above for modifying the article template, but this time access the category template. Look for this code in your category template:

Code:
<div class="articleBody">
{{if excerpt}}
{{excerpt}}&nbsp;&nbsp;&nbsp;<span class="articleMore"><a href="{{view_url}}" align="right" border="0" width="13" height="13">more</a>&nbsp;<strong>&raquo;</strong></span>
{{else}}
{{body}}
{{/if}}
</div> <!-- articleBody -->


Change it to this:

Code:
<div class="articleBody">
{{if excerpt}}
{{excerpt}}&nbsp;&nbsp;&nbsp;<span class="articleMore"><a href="{{view_url}}" align="right" border="0" width="13" height="13">more</a>&nbsp;<strong>&raquo;</strong></span>
{{else}}
{{body}}
<div style="margin-top:8px;margin-bottom:25px; border-top: 1px solid #bbb; border-bottom: 1px solid #bbb;padding:3px;">
Please contact us at this email address: email@example.com.</div>
{{/if}}
</div> <!-- articleBody -->


and now your articles will also have this footer when displayed in category view.

By modifying the article and category templates you can highly customize the look and feel of your blog. Hope this helps get you started.
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