In my experience, template development starts of small. That’s what I had in mind when I started developing the tool. There are just a few steps you’ll need to do when you want to create a page that is different, probably better than the templates shipped with the tool. Those steps are summarized here:
- You’ll need to know what data you’re working with. You review the profile data by enabling the Debug Data On-a-Page option found in the Development Settings tab. Check the option and select an existing page or create a new page at the Debug Data On-a-Page Title list. The page is reloaded when you create a new page using the link, so you’ll have to select the Development Settings tab and check the Debug Data On-a-Page option again when you created a new page.
- Save a copy of the profile. This prevents the number of calls to LinkedIn® and actually speeds your development up a bit. Enable this function by checking the Keep Local Copy checkbox found in the Development Settings tab.
- Select Create your own template from the Installed Page Templates list found in the Page Settings tab and paste your template to the Custom Page Template textbox. Make sure your experimental template does not write its output to your profile page by changing the Profile Page
- Click Save Changes. The tool will fetch your profile and save the data locally.
You’ll find the data on the page you selected at step 2. The tool will mark this page
private after updating it. You’ll have to use the Dashboard to review the page. Use the Preview when you kept Formatted Data On-a-Page checked because the page will contain a lot of formatting.
Make sure the tool uses your saved profile during development by selecting the Use profile data saved after the last update checkbox. Change your template and repeat steps 3 and 4 until you feel it’s good enough. Read on when you think the template should be included in the distribution.
Well, actually not that big, yet. However, LiPS can handle multiple templates. To complicate stuff, it can handle page and post templates. All that needs to be done is add metadata to the template and install it to the right directory.
The tool recognizes your template by metadata. There must be a name, a version and a link to a page containing more information. The metadata can optionally contain a list of static variables and languages. Static variables cover data that is not provided by LinkedIn® but is used in your template. An example of a static variable is the current location: LinkedIn will not provide the zip-code, so you’ll get an area.
Metadata is stored in the file containing the template, wrapped in an XHTML comment block. Field name and value are separated using a colon (
:). The metadata is line oriented, which means each piece of metadata must be fitted on one line.
<!-- template_name: LiPS minimal (table) template_version: 0.9 template_lang: nl template_statics: initialen_achternaam, woonplaats, meer_info template_base_weblink: http://www.tenberge-ict.nl/tools/wordpress/lips/wp-lips-template/ template_sample_weblink: http://www.tenberge-ict.nl/profiel template_query: utm_source=wp-lips, utm_medium=plugin-static-min-nl, utm_campaign=free-plugin template_constant: elementary=Elementaire kennis template_constant: limited_working=Beperkte kennis template_constant: professional_working=Professionele werkvaardigheden template_constant: full_professional=Zo goed als moedertaal template_constant: native_or_bilingual=Moedertaal of tweetalig -->
Add the metadata somewhere in your template and reactivate the lips plugin. The reactivation is required for indexing the metadata.
This table describes the metadata recognized by the template manager.
||Short unique name of the template||
||Version number of the template||
||Base of the url to a website describing template details||
||Comma separated list of static variables. Values are available through the
||URL to a page on which the result of this template is shown||
||Query parameters, used in conjunction with the
||Key, value separated by an equation sign (
You can even specify a cascading style sheet for the page that your template creates. Just install the file to the
css/page directory, and make sure the filename matches the filename of your template, with the extension replaced by
.css. If your template is named
best-template-ever.tpl, the css file would be named
best-template-ever.css. The page template is installed to the
template/page/ directory, and the css to
LiPS indexes your templates, so reactivate the plugin when the css file is not picked-up.