Changeset 28329 for documentation
- Timestamp:
- 2013-09-30T16:26:08+13:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
documentation/trunk/tutorials/xml-source/tutorial_en.xml
r27937 r28329 5062 5062 Ensured every tag had a closing tag (or was self-closing)<br /> 5063 5063 Corrected the paths for the CSS stylesheet and image<br /> 5064 Added in links to certain Greenstone pages (like the <i>Login</i>, <i>Help</i>, and <i>Preferences</i> pages).<br /></Text> 5065 </NumberedItem> 5066 <NumberedItem> 5067 <Text id="hp-09">Adding links to specific pages is relatively straightforward. If you want to link to the backdrop collection, for instance, you could simply add in <Format><a href="library/collection/backdrop">backdrop</a></Format>. However, if you have many collections, this is time consuming, and the home page would have to be modified every time you added or removed a collection. Instead, we can use XSL to insert appropriate HTML into our page for each collection in our library. First, we will <b>define</b> a template that does this, and then we will <b>call</b> this template in the right spot in our HTML.</Text> 5064 Added in links to certain Greenstone pages (like the <i>Login</i>, <i>Help</i>, and <i>Preferences</i> pages).<br /> 5065 Added a page icon.<br /></Text> 5066 </NumberedItem> 5067 <NumberedItem> 5068 <Text id="hp-09">Adding links to specific pages is relatively straightforward. If you want to link to the backdrop collection, for instance, you could simply add in <Format><a href="{$library_name}/collection/backdrop/page/about">backdrop</a></Format>({$library_name} is a variable that, in this case, will become "library" -- you will learn more about library names in later tutorials). However, if you have many collections, this is time consuming, and the home page would have to be modified every time you added or removed a collection. Instead, we can use XSL to insert appropriate HTML into our page for each collection in our library. First, we will <b>define</b> a template that does this, and then we will <b>call</b> this template in the right spot in our HTML.</Text> 5068 5069 </NumberedItem> 5069 5070 <Heading> … … 5082 5083 <Tab n="1"/><xsl:variable name="collectionName" select="@name"/><br /> 5083 5084 <Tab n="2"/><li><br /> 5084 <Tab n="2"/><a href=" library/collection/{$collectionName}/page/about"><br />5085 <Tab n="2"/><a href="{$library_name}/collection/{$collectionName}/page/about"><br /> 5085 5086 <Tab n="2"/><xsl:value-of select="displayItem[@name='name']"/><br /> 5086 5087 <Tab n="2"/></a><br /> … … 5173 5174 <Tab n="2"/><xsl:when test="$username"><br /> 5174 5175 <Tab n="3"/><li><a><br /> 5175 <Tab n="4"/><xsl:attribute name="href"> library/admin/AccountSettings?s1.username=<xsl:value-of select="$username"/></xsl:attribute><xsl:value-of select="$username"/><br />5176 <Tab n="4"/><xsl:attribute name="href"><xsl:value-of select="$library_name"/>/admin/AccountSettings?s1.username=<xsl:value-of select="$username"/></xsl:attribute><xsl:value-of select="$username"/><br /> 5176 5177 <Tab n="3"/></a></li><br /> 5177 <Tab n="3"/><li><a href=" library/admin/Register">Register a new user</a></li><br />5178 <Tab n="4"/><li><a href=" library/admin/ListUsers">Administration</a></li><br />5179 <Tab n="3"/><li><a><xsl:attribute name="href"> library?logout=</xsl:attribute>Logout</a></li><br />5178 <Tab n="3"/><li><a href="{$library_name}/admin/AddUser">Register a new user</a></li><br /> 5179 <Tab n="4"/><li><a href="{$library_name}/admin/ListUsers">Administration</a></li><br /> 5180 <Tab n="3"/><li><a><xsl:attribute name="href"><xsl:value-of select="$library_name"/>?logout=</xsl:attribute>Logout</a></li><br /> 5180 5181 <Tab n="2"/></xsl:when><br /> 5181 5182 <Tab n="2"/><xsl:otherwise><br /> 5182 <Tab n="3"/><li><a href="?a=p&amp;sa=login&amp;redirectURL= library%3Fa=p%26sa=home">Login<br />5183 <Tab n="3"/><li><a href="?a=p&amp;sa=login&amp;redirectURL={$library_name}%3Fa=p%26sa=home">Login<br /> 5183 5184 <Tab n="4"/><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'login_tip')"/></xsl:attribute><br /> 5184 5185 <Tab n="3"/></a></li><br /> … … 5191 5192 <Text id="hp-24">Then, find the following section:</Text> 5192 5193 <Format> 5193 <li><a href="?a=p&sa=login&redirectURL= library%3Fa=p%26sa=home">Login</a></li><br />5194 <li><a href=" library/admin/AccountSettings?s1.username=">Account Settings</a></li><br />5195 <li><a href=" library/admin/AddUser">Register a new user</a></li><br />5196 <li><a href=" library/admin/ListUsers">Administration</a></li><br />5197 <li><a href=" library?logout=">Logout</a></li><br />5194 <li><a href="?a=p&sa=login&redirectURL={$library_name}%3Fa=p%26sa=home">Login</a></li><br /> 5195 <li><a href="{$library_name}/admin/AccountSettings?s1.username=">Account Settings</a></li><br /> 5196 <li><a href="{$library_name}/admin/AddUser">Register a new user</a></li><br /> 5197 <li><a href="{$library_name}/admin/ListUsers">Administration</a></li><br /> 5198 <li><a href="{$library_name}?logout=">Logout</a></li><br /> 5198 5199 </Format> 5199 5200 <Text id="hp-25">And replace it with this:</Text>
Note:
See TracChangeset
for help on using the changeset viewer.