Add a new Content type in template [Solved]

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Locked
EffectiveSites

Add a new Content type in template [Solved]

Post by EffectiveSites »

Code: Select all

<head>
<title></title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<meta name="generator" content="HAPedit 3.1">
{stylesheet}
{metadata}
</head>
</__body>
<div id="container">
	<!--Header section-->
	
  	<div id="header"> 
    	
    <div id="rightHeader"></div>
                 <H1 class="MainHeading">Atlas Construction</H1> <!-- ***** How do I make this heading be different on each page?-->
		<img id="logo" src="../Images/atlasterexLogo2.gif" alt="ATLAS-TEREX logo"> 
		<div id="navAddress">
			<span>Atlas CM, Rathangan, Co. Kildare +353 (0)45-528796</span> 
	  		<h3 class="tagline">Sole distributors for Atlas Terex Excavators in Ireland</h3>
		</div>
  	</div>	
	<!--Content section-->
	<div id="wrapper">
		<div id="content">{content}
		</div>
	</div>

The above is my template. The tag {content} gets replaced by the content in each page - that works fine. What I would like is to have is a similar way to show the "MainHeading" on each page?? I know that I can create a global content block but that will just insert the same text on each page. I want to have the heading be "Products" on the products page and "Services" on the services page etc. How do I do that?

I've spent ages reading the site to try find the answer so I'd really appreciate any pointers..
Last edited by EffectiveSites on Tue May 15, 2007 2:38 pm, edited 1 time in total.
EffectiveSites

Re: Add a new Content type in template [SOLVED]

Post by EffectiveSites »

Hi all,
I was def making this more complicated than it was! I just changed the code in the template to:

Code: Select all

<H1 class="MainHeading">{content block="MainHead" oneline='true'}</H1>
Then when I went to one of the pages - there was the main text area for adding the content and then underneath this there was a textfield called 'MainHeading'. So I just entered the heading I wanted for that page.

Hope this helps someone else.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: Add a new Content type in template [Solved]

Post by calguy1000 »

you could also have used the {$page_title} variable.
{$page_title}

the {get_template_vars} plugin can be used to tell you what variables smarty knows about that you can use in your template.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Locked

Return to “Layout and Design (CSS & HTML)”