Difference between revisions of "SUNScholar/XMLUI Theme/M1/Creation"
| (3 intermediate revisions by the same user not shown) | |||
| Line 10: | Line 10: | ||
===Overlay Method=== | ===Overlay Method=== | ||
| − | '''<font color="red"> | + | We will be using the "modules" overlay method to create a custom theme. |
| + | |||
| + | '''<font color="red">You can replace "SUNScholar" with a theme name of your choice for all of the following instructions.</font>''' | ||
| − | |||
===Step 1 - Copy the "Mirage" reference theme to a custom "SUNScholar"=== | ===Step 1 - Copy the "Mirage" reference theme to a custom "SUNScholar"=== | ||
Type the following to create your own custom theme folder and files using the reference "Mirage" theme. | Type the following to create your own custom theme folder and files using the reference "Mirage" theme. | ||
mkdir $HOME/{{Source}}/dspace/modules/xmlui/src/main/webapp/themes | mkdir $HOME/{{Source}}/dspace/modules/xmlui/src/main/webapp/themes | ||
| − | |||
| − | |||
cd $HOME/{{Source}}/dspace-xmlui/src/main/webapp/themes | cd $HOME/{{Source}}/dspace-xmlui/src/main/webapp/themes | ||
| Line 28: | Line 27: | ||
mv Mirage SUNScholar | mv Mirage SUNScholar | ||
| − | ===Step 2 | + | ===Step 2 - Modify the "sitemap.xmap" file to use "SUNScholar"=== |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
Type the following to change directory to the "SUNScholar" folder. | Type the following to change directory to the "SUNScholar" folder. | ||
| Line 49: | Line 35: | ||
nano sitemap.xmap | nano sitemap.xmap | ||
| − | ====Step | + | ====Step 2.1==== |
Change all the values of <tt>'''{global:theme-path}'''</tt> to <tt>'''SUNScholar'''</tt>. | Change all the values of <tt>'''{global:theme-path}'''</tt> to <tt>'''SUNScholar'''</tt>. | ||
| − | ====Step | + | ====Step 2.2==== |
Change the "theme-path" and "theme-name" parameters to <tt>'''SUNScholar'''</tt>. | Change the "theme-path" and "theme-name" parameters to <tt>'''SUNScholar'''</tt>. | ||
<pre> | <pre> | ||
| Line 61: | Line 47: | ||
</map:component-configurations> | </map:component-configurations> | ||
</pre> | </pre> | ||
| − | + | ===Step 3 - Rename the "Mirage.xsl" file to "SUNScholar.xsl"=== | |
| − | ===Step | ||
Type the following. | Type the following. | ||
cd $HOME/{{Source}}/dspace/modules/xmlui/src/main/webapp/themes/SUNScholar | cd $HOME/{{Source}}/dspace/modules/xmlui/src/main/webapp/themes/SUNScholar | ||
Rename the "Mirage.xsl" file to "SUNScholar.xsl" by typing the following. | Rename the "Mirage.xsl" file to "SUNScholar.xsl" by typing the following. | ||
mv Mirage.xsl SUNScholar.xsl | mv Mirage.xsl SUNScholar.xsl | ||
| + | ===Step 4 - Modify the "xmlui.xconf" file to use "SUNScholar"=== | ||
| + | Edit the following file: | ||
| + | nano $HOME/{{Source}}/dspace/config/xmlui.xconf | ||
| + | |||
| + | Add the following to "xmlui.xconf" file in the themes section using copy and paste with firefox and nano. | ||
| + | |||
| + | <font color="red">'''Make sure to comment out all other theme references !!'''</font> | ||
| + | <pre> | ||
| + | <theme name="SUNScholar" regex=".*" path="SUNScholar/" /> | ||
| + | </pre> | ||
| + | |||
| + | {{NANO}} | ||
__NOTOC__ | __NOTOC__ | ||
| + | [[Category:Customisation]] | ||
Latest revision as of 12:03, 28 May 2016
Back to Mirage 1
Requirements
- Use port 80 and 443 as default on the Tomcat Java webapp server.
- Configure chosen UI as the default ROOT Java webapp.
Please see: http://wiki.lib.sun.ac.za/index.php/SUNScholar/Install_DSpace/S03
Make sure you have correctly "symlinked" to the source code, see step 3.2 in the link above.
Overlay Method
We will be using the "modules" overlay method to create a custom theme.
You can replace "SUNScholar" with a theme name of your choice for all of the following instructions.
Step 1 - Copy the "Mirage" reference theme to a custom "SUNScholar"
Type the following to create your own custom theme folder and files using the reference "Mirage" theme.
mkdir $HOME/source/dspace/modules/xmlui/src/main/webapp/themes
cd $HOME/source/dspace-xmlui/src/main/webapp/themes
cp -R Mirage $HOME/source/dspace/modules/xmlui/src/main/webapp/themes/
cd $HOME/source/dspace/modules/xmlui/src/main/webapp/themes
mv Mirage SUNScholar
Step 2 - Modify the "sitemap.xmap" file to use "SUNScholar"
Type the following to change directory to the "SUNScholar" folder.
cd $HOME/source/dspace/modules/xmlui/src/main/webapp/themes/SUNScholar
Modify the sitemap.xmap config file for your new theme by typing the following.
nano sitemap.xmap
Step 2.1
Change all the values of {global:theme-path} to SUNScholar.
Step 2.2
Change the "theme-path" and "theme-name" parameters to SUNScholar.
<map:component-configurations>
<global-variables>
<theme-path>SUNScholar</theme-path>
<theme-name>SUNScholar</theme-name>
</global-variables>
</map:component-configurations>
Step 3 - Rename the "Mirage.xsl" file to "SUNScholar.xsl"
Type the following.
cd $HOME/source/dspace/modules/xmlui/src/main/webapp/themes/SUNScholar
Rename the "Mirage.xsl" file to "SUNScholar.xsl" by typing the following.
mv Mirage.xsl SUNScholar.xsl
Step 4 - Modify the "xmlui.xconf" file to use "SUNScholar"
Edit the following file:
nano $HOME/source/dspace/config/xmlui.xconf
Add the following to "xmlui.xconf" file in the themes section using copy and paste with firefox and nano.
Make sure to comment out all other theme references !!
<theme name="SUNScholar" regex=".*" path="SUNScholar/" />
- NANO Editor Help
| CTL+O | = Save the file and then press Enter |
| CTL+X | = Exit "nano" |
| CTL+K | = Delete line |
| CTL+U | = Undelete line |
| CTL+W | = Search for %%string%% |
| CTL+\ | = Search for %%string%% and replace with $$string$$ |
| CTL+C | = Show line numbers |
More info = http://en.wikipedia.org/wiki/Nano_(text_editor)