Page 1 of 1

[PHP export] Custom stylesheets

PostPosted: Fri 12. Apr 2013, 18:40
by Eddy-R3
Next question, lol sorry guys, styling, ive tried adding custom style sheets to MyConfig.php and even tried setting the styles in style.php but that gets overwritten when you update the properties, how/where can i change the colours/styles of the details on the site? :)

many thanks!

Re: [PHP export] Custom stylesheets

PostPosted: Sun 14. Apr 2013, 10:52
by Andreas Rudolph
Hi Eddy-R3,

I've separated your question from the original thread into a separate thread.

Eddy-R3 wrote:ive tried adding custom style sheets to MyConfig.php and even tried setting the styles in style.php but that gets overwritten when you update the properties, how/where can i change the colours/styles of the details on the site? :)

You should not change "style.php" directly. These modifications get lost with the next export from ImmoTool.

If you want to override the default styles of "style.php", you should create a separate CSS file on your webspace - let's place it for example at http://emonestates.co.uk/immo/mystyle.css. Put all of your CSS modifications into this file. Maybe you should add an !important flag after each CSS rule in your "mystyle.css" file to make sure, that these definitions are processed with precedence (higher priority).

To make your "mystyle.css" known to the PHP export, you should place the following configuration into your "myconfig.php":

Code: Select all
  /**
   * Allgemeine Konfiguration überschreiben.
   * @param object $config Konfigurations-Objekt
   */
  function load_config_default( &$config ) {
    // Keinen Content-Type verwenden, wenn eine Einbindung durch einen Wrapper stattfindet
    if (defined('OPENESTATE_WRAPPER')) $config->ContentType = null;

    $config->AdditionalStylesheet = 'http://emonestates.co.uk/immo/mystyle.css';
  } 

The relevant part is "$config->AdditionalStylesheet = 'http://emonestates.co.uk/immo/mystyle.css';" - the rest should already be present in your "myconfig.php".

Please let me know, If you have a problem with a certain CSS modification. I think that most CSS issues, that occur together with the CSS of your CMSms template, can easily be fixed in the suggested way...

Re: [PHP export] Custom stylesheets

PostPosted: Mon 15. Apr 2013, 11:06
by Eddy-R3
Excellent thanks again Andreas! :) Worked out perfectly :D