How to Set up a Custom Linked Data Frontend?
How to Set up a Custom Linked Data Frontend?
First, please refer to the documentation here, before you start to customize the Linked Data Frontend:
Set Up Resources for the Customization
Customize All Projects at Once
Change the directory to custom:
cd /opt/poolparty/data/frontendRoot/custom
Copy velocity templates, css style sheets, images, etc. to the custom directory:
cp -r /opt/poolparty/data/frontendRoot/default/* .
Change path values. Since there are numerous path definitions, especially in .vm files, you have to replace paths to respective resources:
This will change 'default' to 'custom' in all files at once.
Execute these commands in the following folder:
frontendRoot/custom
grep -rl 'default' . | xargs sed -i "s|default/|custom/|g"
Using this setup you can customize all projects at once.
Customize Particular Projects
If you intend to customize one or more projects specifically, you have to follow these steps:
Copy template, style sheet files etc. into the project specific directory and change paths, similar to steps 2 and 3 above, for all projects.
Example: In the 'Austrian Music Graph' project, paths would be 'custom/AustrianMusicGraph'.
Examples of Customization
I. Add Custom Relations to the Set of Listed Properties
Add property to vars.vm
conf.vm: Enter requested property keys to $listedProperties
To give the property a reader friendly label you can enter them for example in lang/en.vm
II. Replace Header Logo
Copy logo image into /images
Adapt head.vm to match your requirements.
III. Header Logo Customization
<div id="logo"><a href="http://www.worldbank.org/"><img border="0" src="#frontendLink('custom/images/wb_logo.png')" alt="$serverName" /></a></div>
IV. Introduce a 'Powered by' Logo at the Bottom of the Page
Copy logo image into /images
Adapt foot.vm to match your requirements.
VI. Replace Tile Images
Copy tile image into /images
Change image URL in /css/style.css entry under body:background
VII. Configure Blank White Background
Edit css/style.css
... html { height: 100%; overflow-y: scroll; width: 100%; background: #ffffff; } body { background: #ffffff; font-size: 0.813em; color:#474747; padding-bottom: 60px; } ...
VIII. Change default serverName
The default value of the variable serverName
can be customized:
Edit conf.vm
## Common settings .. #set($serverName = "My custom PoolParty server name") ..