2010-02-07, 09:49:44
Say you wanted to have a different header image on each page. You would have something like this on your theme.
Install the customfields plugin and edit or create /pages/other/customfields.xml
and add the following.
Each <item> must have 3 parts,
desc - id of the customfield
label - what to display on the page edit form
type - type of field, either text or dropdown.
if type is dropdown add <option></option> tags with whatever you want in the dropdown menu
Now when you edit your pages you should have a new field "Header Image"
Change your template file to use the following instead
Simple example, check out http://cmstest.digimute.com
which uses 3 new fields to create the portfolio - subtitle, image and jobtype.
Hope it helps, let me know if you need more info.
Mike.
Code:
<div id="header">
<img src="yourimage.jpg" alt="" />
</div>
Install the customfields plugin and edit or create /pages/other/customfields.xml
and add the following.
Code:
<?xml version="1.0" encoding="UTF-8"?>
<channel>
<item><desc>image</desc><label>Header Image</label><type>text</type></item>
</channel>
Each <item> must have 3 parts,
desc - id of the customfield
label - what to display on the page edit form
type - type of field, either text or dropdown.
if type is dropdown add <option></option> tags with whatever you want in the dropdown menu
Now when you edit your pages you should have a new field "Header Image"
Change your template file to use the following instead
Code:
<div id="header">
<img src="<?php getCustomField('image');" alt="" />
</div>
Simple example, check out http://cmstest.digimute.com
which uses 3 new fields to create the portfolio - subtitle, image and jobtype.
Hope it helps, let me know if you need more info.
Mike.