Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Form Questions /

XE.com Currency Convertor


Reply


6 Posts   2215 Views

Avatar
innyinskip

Community Member, 46 Posts

17 July 2010 at 12:11am

Hi Guys,

Im very new to silverstripe so be gentle.
I have managed to get my page up and running, using a few modules and widgets etc.

Ive come across a stumbling block.
I am trying to add a page for our accounts team which is a currency convertor from XE.com

It has been given in html to me from their site but i havent the foggiest where to start to try and get it onto their page.

Can anyone lend a hand please?

The code i have is:

<!-- XE.com Universal Currency Converter(tm) Input Page Starts -->
<!-- Copyright (c) 2005 XE.com. Unauthorized use prohibited. -->
<!-- Input Template Version 3.10 -->
<!-- You may reformat this page section, but do not delete lines or variables that start with an asterisk -->

<FORM METHOD=POST ACTION="http://www.xe.com/ucc/convert.cgi">

<P><TABLE WIDTH=100% CELLPADDING=1 CELLSPACING=0 BORDER=0 BGCOLOR=#000000><TR><TD ALIGN=CENTER>
<TABLE WIDTH=100% CELLPADDING=3 CELLSPACING=1 BORDER=0>

<TR VALIGN=TOP ALIGN=CENTER>
<TD BGCOLOR=#FFF090><B>
<FONT FACE="Arial,Helvetica">
<FONT SIZE=+1>xe.com&nbsp;</FONT>
Universal Currency Converter<FONT SIZE=-1><SUP> &reg;</SUP></FONT>
</FONT>
</B></TD>
</TR>

<TR VALIGN=TOP ALIGN=LEFT>
<TD VALIGN=MIDDLE ALIGN=CENTER BGCOLOR=#FFFFFF>
<TABLE CELLSPACING=3 CELLPADDING=2 BORDER=0 WIDTH=100%><TR>
<TD><FONT FACE="Arial,Helvetica">
<!XERC-UCC1-P1.1-R1>
<B>Convert this amount</B><BR>
</FONT></TD>
<TD><FONT FACE="Arial,Helvetica">
<!XERC-UCC1-P1.3-R1>
<B>of this type of currency</B><BR>
</FONT></TD>
<TD><FONT FACE="Arial,Helvetica">
<!XERC-UCC1-P1.5-R1>
<B>into this type of currency.</B><BR>
</FONT></TD>
</TR>

<TR VALIGN=TOP ALIGN=LEFT>

<TD><FONT FACE="Arial,Helvetica">
<INPUT TYPE="text" NAME="Amount" VALUE="1" SIZE=10><BR>
<!XERC-UCC1-P1.2-R2>
<FONT SIZE=-1><B>enter any amount</B></FONT>
</FONT></TD>

<TD><FONT FACE="Arial,Helvetica" SIZE=-1>
<SELECT NAME="From" SIZE=5>
<OPTION VALUE="EUR" SELECTED>Euro EUR</OPTION>
<OPTION VALUE="USD">United States Dollars USD</OPTION>
<OPTION VALUE="GBP">United Kingdom Pounds GBP</OPTION>
<OPTION VALUE="CAD">Canada Dollars CAD</OPTION>
<OPTION VALUE="AUD">Australia Dollars AUD</OPTION>
<OPTION VALUE="JPY">Japan Yen JPY</OPTION>
<OPTION VALUE="INR">India Rupees INR</OPTION>
<OPTION VALUE="NZD">New Zealand Dollars NZD</OPTION>
<OPTION VALUE="CHF">Switzerland Francs CHF</OPTION>
<OPTION VALUE="ZAR">South Africa Rand ZAR</OPTION>
<OPTION VALUE="EUR">-- Top 85 Currencies: --</OPTION>
<OPTION VALUE="AFA">Afghanistan Afghanis AFA</option>
<OPTION VALUE="ALL">Albania Leke ALL</option>
<OPTION VALUE="DZD">Algeria Dinars DZD</OPTION>
<OPTION VALUE="USD">America (United States) Dollars USD</OPTION>
<OPTION VALUE="ARS">Argentina Pesos ARS</OPTION>
<OPTION VALUE="AUD">Australia Dollars AUD</OPTION>
<OPTION VALUE="ATS">Austria Schillings ATS*</OPTION>
<OPTION VALUE="BSD">Bahamas Dollars BSD</OPTION>
<OPTION VALUE="BHD">Bahrain Dinars BHD</OPTION>
<OPTION VALUE="BDT">Bangladesh Taka BDT</OPTION>
<OPTION VALUE="BBD">Barbados Dollars BBD</OPTION>
<OPTION VALUE="BEF">Belgium Francs BEF*</OPTION>
<OPTION VALUE="BMD">Bermuda Dollars BMD</OPTION>
<OPTION VALUE="BRL">Brazil Reais BRL</OPTION>
<OPTION VALUE="BGN">Bulgaria Leva BGN</OPTION>
<OPTION VALUE="CAD">Canada Dollars CAD</OPTION>
<OPTION VALUE="XOF">CFA BCEAO Francs XOF</OPTION>
<OPTION VALUE="XAF">CFA BEAC Francs XAF</OPTION>
<OPTION VALUE="CLP">Chile Pesos CLP</OPTION>
<OPTION VALUE="CNY">China Yuan Renminbi CNY</OPTION>
<OPTION VALUE="COP">Colombia Pesos COP</OPTION>
<OPTION VALUE="XPF">Comptoirs Français du Pacifique Francs</OPTION>
<OPTION VALUE="CRC">Costa Rica Colones CRC</OPTION>
<OPTION VALUE="HRK">Croatia Kuna HRK</OPTION>
<OPTION VALUE="CYP">Cyprus Pounds CYP</OPTION>
<OPTION VALUE="CZK">Czech Republic Koruny CZK</OPTION>
<OPTION VALUE="DKK">Denmark Kroner DKK</OPTION>
<OPTION VALUE="DEM">Deutsche (Germany) Marks DEM*</OPTION>
<OPTION VALUE="DOP">Dominican Republic Pesos DOP</OPTION>
<OPTION VALUE="NLG">Dutch (Netherlands) Guilders NLG*</OPTION>
<OPTION VALUE="XCD">Eastern Caribbean Dollars XCD</OPTION>
<OPTION VALUE="EGP">Egypt Pounds EGP</OPTION>
<OPTION VALUE="EEK">Estonia Krooni EEK</OPTION>
<OPTION VALUE="EUR">Euro EUR</OPTION>
<OPTION VALUE="FJD">Fiji Dollars FJD</OPTION>
<OPTION VALUE="FIM">Finland Markkaa FIM*</OPTION>
<OPTION VALUE="FRF">France Francs FRF*</OPTION>
<OPTION VALUE="DEM">Germany Deutsche Marks DEM*</OPTION>
<OPTION VALUE="XAU">Gold Ounces XAU</OPTION>
<OPTION VALUE="GRD">Greece Drachmae GRD*</OPTION>
<OPTION VALUE="NLG">Holland (Netherlands) Guilders NLG*</OPTION>
<OPTION VALUE="HKD">Hong Kong Dollars HKD</OPTION>
<OPTION VALUE="HUF">Hungary Forint HUF</OPTION>
<OPTION VALUE="ISK">Iceland Kronur ISK</OPTION>
<OPTION VALUE="XDR">IMF Special Drawing Right XDR</OPTION>
<OPTION VALUE="INR">India Rupees INR</OPTION>
<OPTION VALUE="IDR">Indonesia Rupiahs IDR</OPTION>
<OPTION VALUE="IRR">Iran Rials IRR</OPTION>
<OPTION VALUE="IQD">Iraq Dinars IQD</OPTION>
<OPTION VALUE="IEP">Ireland Pounds IEP*</OPTION>
<OPTION VALUE="ILS">Israel New Shekels ILS</OPTION>
<OPTION VALUE="ITL">Italy Lire ITL*</OPTION>
<OPTION VALUE="JMD">Jamaica Dollars JMD</OPTION>
<OPTION VALUE="JPY">Japan Yen JPY</OPTION>
<OPTION VALUE="JOD">Jordan Dinars JOD</OPTION>
<OPTION VALUE="KES">Kenya Shillings KES</OPTION>
<OPTION VALUE="KRW">Korea (South) Won KRW</OPTION>
<OPTION VALUE="KWD">Kuwait Dinars KWD</OPTION>
<OPTION VALUE="LBP">Lebanon Pounds LBP</OPTION>
<OPTION VALUE="LUF">Luxembourg Francs LUF*</OPTION>
<OPTION VALUE="MYR">Malaysia Ringgits MYR</OPTION>
<OPTION VALUE="MTL">Malta Liri MTL</OPTION>
<OPTION VALUE="MUR">Mauritius Rupees MUR</OPTION>
<OPTION VALUE="MXN">Mexico Pesos MXN</OPTION>
<OPTION VALUE="MAD">Morocco Dirhams MAD</OPTION>
<OPTION VALUE="NLG">Netherlands Guilders NLG*</OPTION>
<OPTION VALUE="NZD">New Zealand Dollars NZD</OPTION>
<OPTION VALUE="NOK">Norway Kroner NOK</OPTION>
<OPTION VALUE="OMR">Oman Rials OMR</OPTION>
<OPTION VALUE="PKR">Pakistan Rupees PKR</OPTION>
<OPTION VALUE="XPD">Palladium Ounces XPD</OPTION>
<OPTION VALUE="PEN">Peru Nuevos Soles PEN</OPTION>
<OPTION VALUE="PHP">Philippines Pesos PHP</OPTION>
<OPTION VALUE="XPT">Platinum Ounces XPT</OPTION>
<OPTION VALUE="PLN">Poland Zlotych PLN</OPTION>
<OPTION VALUE="PTE">Portugal Escudos PTE*</OPTION>
<OPTION VALUE="QAR">Qatar Riyals QAR</OPTION>
<OPTION VALUE="ROL">Romania Lei ROL</OPTION>
<OPTION VALUE="RUB">Russia Rubles RUB</OPTION>
<OPTION VALUE="SAR">Saudi Arabia Riyals SAR</OPTION>
<OPTION VALUE="XAG">Silver Ounces XAG</OPTION>
<OPTION VALUE="SGD">Singapore Dollars SGD</OPTION>
<OPTION VALUE="SKK">Slovakia Koruny SKK</OPTION>
<OPTION VALUE="SIT">Slovenia Tolars SIT</OPTION>
<OPTION VALUE="ZAR">South Africa Rand ZAR</OPTION>
<OPTION VALUE="KRW">South Korea Won KRW</OPTION>
<OPTION VALUE="ESP">Spain Pesetas ESP*</OPTION>
<OPTION VALUE="XDR">Special Drawing Rights (IMF) XDR</OPTION>
<OPTION VALUE="LKR">Sri Lanka Rupees LKR</OPTION>
<OPTION VALUE="SDD">Sudan Dinars SDD</OPTION>
<OPTION VALUE="SEK">Sweden Kronor SEK</OPTION>
<OPTION VALUE="CHF">Switzerland Francs CHF</OPTION>
<OPTION VALUE="TWD">Taiwan New Dollars TWD</OPTION>
<OPTION VALUE="THB">Thailand Baht THB</OPTION>
<OPTION VALUE="TTD">Trinidad and Tobago Dollars TTD</OPTION>
<OPTION VALUE="TND">Tunisia Dinars TND</OPTION>
<OPTION VALUE="TRY">Turkey New Lira TRY</OPTION>
<OPTION VALUE="TRL">Turkey Lira TRL*</OPTION>
<OPTION VALUE="AED">United Arab Emirates Dirhams AED</OPTION>
<OPTION VALUE="GBP">United Kingdom Pounds GBP</OPTION>
<OPTION VALUE="USD">United States Dollars USD</OPTION>
<OPTION VALUE="VEB">Venezuela Bolivares VEB</OPTION>
<OPTION VALUE="VND">Vietnam Dong VND</OPTION>
<OPTION VALUE="ZMK">Zambia Kwacha ZMK</OPTION>
<OPTION VALUE="EUR">-- Special Units: --</OPTION>
<OPTION VALUE="XAF">CFA BEAC Francs XAF</OPTION>
<OPTION VALUE="XOF">CFA BCEAO Francs XOF</OPTION>
<OPTION VALUE="XPF">Comptoirs Français du Pacifique Francs</OPTION>
<OPTION VALUE="XCD">Eastern Caribbean Dollars XCD</OPTION>
<OPTION VALUE="EUR">Euro EUR</OPTION>
<OPTION VALUE="XDR">IMF Special Drawing Rights XDR</OPTION>
<OPTION VALUE="XAU">-- Precious Metals: --</OPTION>
<OPTION VALUE="XAG">Silver Ounces XDR</OPTION>
<OPTION VALUE="XAU">Gold Ounces XAU</OPTION>
<OPTION VALUE="XPT">Platinum Ounces XPT</OPTION>
<OPTION VALUE="XPD">Palladium Ounces XPD</OPTION>
</SELECT><BR>
<!XERC-UCC1-P1.4-R2>
<FONT SIZE=-1><B>scroll down to see more currencies</B></FONT>
</FONT></TD>

<TD><FONT FACE="Arial,Helvetica" SIZE=-1>
<SELECT NAME="To" SIZE=5>
<OPTION VALUE="USD" SELECTED>United States Dollars USD</OPTION>
<OPTION VALUE="EUR">Euro EUR</OPTION>
<OPTION VALUE="GBP">United Kingdom Pounds GBP</OPTION>
<OPTION VALUE="CAD">Canada Dollars CAD</OPTION>
<OPTION VALUE="AUD">Australia Dollars AUD</OPTION>
<OPTION VALUE="JPY">Japan Yen JPY</OPTION>
<OPTION VALUE="INR">India Rupees INR</OPTION>
<OPTION VALUE="NZD">New Zealand Dollars NZD</OPTION>
<OPTION VALUE="CHF">Switzerland Francs CHF</OPTION>
<OPTION VALUE="ZAR">South Africa Rand ZAR</OPTION>
<OPTION VALUE="USD">-- Top 85 Currencies: --</OPTION>
<OPTION VALUE="AFA">Afghanistan Afghanis AFA</option>
<OPTION VALUE="ALL">Albania Leke ALL</option>
<OPTION VALUE="DZD">Algeria Dinars DZD</OPTION>
<OPTION VALUE="USD">America (United States) Dollars USD</OPTION>
<OPTION VALUE="ARS">Argentina Pesos ARS</OPTION>
<OPTION VALUE="AUD">Australia Dollars AUD</OPTION>
<OPTION VALUE="ATS">Austria Schillings ATS*</OPTION>
<OPTION VALUE="BSD">Bahamas Dollars BSD</OPTION>
<OPTION VALUE="BHD">Bahrain Dinars BHD</OPTION>
<OPTION VALUE="BDT">Bangladesh Taka BDT</OPTION>
<OPTION VALUE="BBD">Barbados Dollars BBD</OPTION>
<OPTION VALUE="BEF">Belgium Francs BEF*</OPTION>
<OPTION VALUE="BMD">Bermuda Dollars BMD</OPTION>
<OPTION VALUE="BRL">Brazil Reais BRL</OPTION>
<OPTION VALUE="BGN">Bulgaria Leva BGN</OPTION>
<OPTION VALUE="CAD">Canada Dollars CAD</OPTION>
<OPTION VALUE="XOF">CFA BCEAO Francs XOF</OPTION>
<OPTION VALUE="XAF">CFA BEAC Francs XAF</OPTION>
<OPTION VALUE="CLP">Chile Pesos CLP</OPTION>
<OPTION VALUE="CNY">China Yuan Renminbi CNY</OPTION>
<OPTION VALUE="COP">Colombia Pesos COP</OPTION>
<OPTION VALUE="XPF">Comptoirs Français du Pacifique Francs</OPTION>
<OPTION VALUE="CRC">Costa Rica Colones CRC</OPTION>
<OPTION VALUE="HRK">Croatia Kuna HRK</OPTION>
<OPTION VALUE="CYP">Cyprus Pounds CYP</OPTION>
<OPTION VALUE="CZK">Czech Republic Koruny CZK</OPTION>
<OPTION VALUE="DKK">Denmark Kroner DKK</OPTION>
<OPTION VALUE="DEM">Deutsche (Germany) Marks DEM*</OPTION>
<OPTION VALUE="DOP">Dominican Republic Pesos DOP</OPTION>
<OPTION VALUE="NLG">Dutch (Netherlands) Guilders NLG*</OPTION>
<OPTION VALUE="XCD">Eastern Caribbean Dollars XCD</OPTION>
<OPTION VALUE="EGP">Egypt Pounds EGP</OPTION>
<OPTION VALUE="EEK">Estonia Krooni EEK</OPTION>
<OPTION VALUE="EUR">Euro EUR</OPTION>
<OPTION VALUE="FJD">Fiji Dollars FJD</OPTION>
<OPTION VALUE="FIM">Finland Markkaa FIM*</OPTION>
<OPTION VALUE="FRF">France Francs FRF*</OPTION>
<OPTION VALUE="DEM">Germany Deutsche Marks DEM*</OPTION>
<OPTION VALUE="XAU">Gold Ounces XAU</OPTION>
<OPTION VALUE="GRD">Greece Drachmae GRD*</OPTION>
<OPTION VALUE="NLG">Holland (Netherlands) Guilders NLG*</OPTION>
<OPTION VALUE="HKD">Hong Kong Dollars HKD</OPTION>
<OPTION VALUE="HUF">Hungary Forint HUF</OPTION>
<OPTION VALUE="ISK">Iceland Kronur ISK</OPTION>
<OPTION VALUE="XDR">IMF Special Drawing Right XDR</OPTION>
<OPTION VALUE="INR">India Rupees INR</OPTION>
<OPTION VALUE="IDR">Indonesia Rupiahs IDR</OPTION>
<OPTION VALUE="IRR">Iran Rials IRR</OPTION>
<OPTION VALUE="IQD">Iraq Dinars IQD</OPTION>
<OPTION VALUE="IEP">Ireland Pounds IEP*</OPTION>
<OPTION VALUE="ILS">Israel New Shekels ILS</OPTION>
<OPTION VALUE="ITL">Italy Lire ITL*</OPTION>
<OPTION VALUE="JMD">Jamaica Dollars JMD</OPTION>
<OPTION VALUE="JPY">Japan Yen JPY</OPTION>
<OPTION VALUE="JOD">Jordan Dinars JOD</OPTION>
<OPTION VALUE="KES">Kenya Shillings KES</OPTION>
<OPTION VALUE="KRW">Korea (South) Won KRW</OPTION>
<OPTION VALUE="KWD">Kuwait Dinars KWD</OPTION>
<OPTION VALUE="LBP">Lebanon Pounds LBP</OPTION>
<OPTION VALUE="LUF">Luxembourg Francs LUF*</OPTION>
<OPTION VALUE="MYR">Malaysia Ringgits MYR</OPTION>
<OPTION VALUE="MTL">Malta Liri MTL</OPTION>
<OPTION VALUE="MUR">Mauritius Rupees MUR</OPTION>
<OPTION VALUE="MXN">Mexico Pesos MXN</OPTION>
<OPTION VALUE="MAD">Morocco Dirhams MAD</OPTION>
<OPTION VALUE="NLG">Netherlands Guilders NLG*</OPTION>
<OPTION VALUE="NZD">New Zealand Dollars NZD</OPTION>
<OPTION VALUE="NOK">Norway Kroner NOK</OPTION>
<OPTION VALUE="OMR">Oman Rials OMR</OPTION>
<OPTION VALUE="PKR">Pakistan Rupees PKR</OPTION>
<OPTION VALUE="XPD">Palladium Ounces XPD</OPTION>
<OPTION VALUE="PEN">Peru Nuevos Soles PEN</OPTION>
<OPTION VALUE="PHP">Philippines Pesos PHP</OPTION>
<OPTION VALUE="XPT">Platinum Ounces XPT</OPTION>
<OPTION VALUE="PLN">Poland Zlotych PLN</OPTION>
<OPTION VALUE="PTE">Portugal Escudos PTE*</OPTION>
<OPTION VALUE="QAR">Qatar Riyals QAR</OPTION>
<OPTION VALUE="ROL">Romania Lei ROL</OPTION>
<OPTION VALUE="RUB">Russia Rubles RUB</OPTION>
<OPTION VALUE="SAR">Saudi Arabia Riyals SAR</OPTION>
<OPTION VALUE="XAG">Silver Ounces XAG</OPTION>
<OPTION VALUE="SGD">Singapore Dollars SGD</OPTION>
<OPTION VALUE="SKK">Slovakia Koruny SKK</OPTION>
<OPTION VALUE="SIT">Slovenia Tolars SIT</OPTION>
<OPTION VALUE="ZAR">South Africa Rand ZAR</OPTION>
<OPTION VALUE="KRW">South Korea Won KRW</OPTION>
<OPTION VALUE="ESP">Spain Pesetas ESP*</OPTION>
<OPTION VALUE="XDR">Special Drawing Rights (IMF) XDR</OPTION>
<OPTION VALUE="LKR">Sri Lanka Rupees LKR</OPTION>
<OPTION VALUE="SDD">Sudan Dinars SDD</OPTION>
<OPTION VALUE="SEK">Sweden Kronor SEK</OPTION>
<OPTION VALUE="CHF">Switzerland Francs CHF</OPTION>
<OPTION VALUE="TWD">Taiwan New Dollars TWD</OPTION>
<OPTION VALUE="THB">Thailand Baht THB</OPTION>
<OPTION VALUE="TTD">Trinidad and Tobago Dollars TTD</OPTION>
<OPTION VALUE="TND">Tunisia Dinars TND</OPTION>
<OPTION VALUE="TRY">Turkey New Lira TRY</OPTION>
<OPTION VALUE="TRL">Turkey Lira TRL*</OPTION>
<OPTION VALUE="AED">United Arab Emirates Dirhams AED</OPTION>
<OPTION VALUE="GBP">United Kingdom Pounds GBP</OPTION>
<OPTION VALUE="USD">United States Dollars USD</OPTION>
<OPTION VALUE="VEB">Venezuela Bolivares VEB</OPTION>
<OPTION VALUE="VND">Vietnam Dong VND</OPTION>
<OPTION VALUE="ZMK">Zambia Kwacha ZMK</OPTION>
<OPTION VALUE="EUR">-- Special Units: --</OPTION>
<OPTION VALUE="XAF">CFA BEAC Francs XAF</OPTION>
<OPTION VALUE="XOF">CFA BCEAO Francs XOF</OPTION>
<OPTION VALUE="XPF">Comptoirs Français du Pacifique Francs</OPTION>
<OPTION VALUE="XCD">Eastern Caribbean Dollars XCD</OPTION>
<OPTION VALUE="EUR">Euro EUR</OPTION>
<OPTION VALUE="XDR">IMF Special Drawing Rights XDR</OPTION>
<OPTION VALUE="XAU">-- Precious Metals: --</OPTION>
<OPTION VALUE="XAG">Silver Ounces XDR</OPTION>
<OPTION VALUE="XAU">Gold Ounces XAU</OPTION>
<OPTION VALUE="XPT">Platinum Ounces XPT</OPTION>
<OPTION VALUE="XPD">Palladium Ounces XPD</OPTION>
</SELECT><BR>
<!XERC-UCC1-P1.6-R2>
<FONT SIZE=-1><B>scroll down to see more currencies</B></FONT>
</FONT></TD>

</TR>

<TR ALIGN=CENTER>
<TD COLSPAN=3 ALIGN=CENTER><FONT FACE="Arial,Helvetica,sans-serif">
<!XERC-UCC1-P3.2-R1>
<INPUT VALUE="Click Here to Perform Currency Conversion" type=submit>
</FONT></TD>
</TR>
</TD></TR></TABLE>

<TR ALIGN=CENTER>
<TD BGCOLOR=#F0F0F0 ALIGN=CENTER><FONT FACE="Arial,Helvetica,sans-serif" SIZE=-1 COLOR=#808080>
<!-- Important Section Start -->
<!-- ALL of the contents of this section are required under the usage agreement! -->
<FONT COLOR=#808080><B>Universal Currency Converter</B> under license from <B>XE.com</B>. <A HREF="http://www.xe.com/legal/" style="color:#808080;">Terms of Use</A>
<!-- Important Section Ends -->
</FONT></TD>
</TR>

</TABLE>
</TD></TR></TABLE></P>

<!-- XE.com Universal Currency Converter(tm) Input Page Ends -->

Many Thanks!
Craig

Avatar
swaiba

Forum Moderator, 1798 Posts

17 July 2010 at 1:43pm

Edited: 18/07/2010 5:36am

Hi Craig,

I think you could just edit the page you required the HTML in the CMS by clicking the button HTML (tooltip = Edit HTML Source) and insert directly there. Alternatively you could create a page type and insert it into the relevant ss template file... e.g.

mysite/code/XEPage.php...

<?php
class XEPage extends Page {

}

class XE_PageController extends Page_Controller {

}
?>

mysite/templates/Layouts/XEPage.ss...

<your HTML here>

Hope this helps,

Barry

Avatar
innyinskip

Community Member, 46 Posts

17 July 2010 at 11:43pm

Thanks Barry,

I did try just inserting the html from the TinyMCE editor but no joy.
I have also just tried your other suggestion. I get the apge type within the admin section but when creating the page on the site and trying to view it i get a page cannot be displayed.

I put the html/php page in saphire/templates/layout but nothing.
Am i missing something?
Im starting to slightly get my way around things, widgets on the main page was the first hurdle! lol.

Thanks again for all your help!
Craig

Avatar
swaiba

Forum Moderator, 1798 Posts

18 July 2010 at 5:40am

Hi Craig,

The layout should be in {webroot}/mysite/templates/Layouts/XEPage.ss...

(I just edited my previous post as I had mysite/templates/Layouts/XEPage.php in it - wrong!)

Also do a dev/build?flush=1 after wards to pick up the new template - or follow this great advice http://www.ssbits.com/automatically-flush-when-in-dev-mode/ to make sure you never forget!

Barry

Avatar
innyinskip

Community Member, 46 Posts

19 July 2010 at 12:20am

Hi Barry,

I dont have a templates folder within 'mysite' just 'code' and 'javascript' should i create them?

Thanks
Craig

Avatar
swaiba

Forum Moderator, 1798 Posts

19 July 2010 at 1:28am

yep and the sub folder Layouts

silver stripe looks for the template in mysite/templates/... or in your theme/THEMENAME/templates/... (where ... is Include or Layouts) you can override any of the silver stripe ones from cms by creating it in mysite/templates/...