[PHP export] Custom stylesheets

Discussions about programming for OpenEstate-ImmoTool
Forum rules
Please consider the general rules for this board, before you enter the discussion.

[PHP export] Custom stylesheets

Postby Eddy-R3 » Fri 12. Apr 2013, 18:40

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!
Eddy-R3
 

Re: [PHP export] Custom stylesheets

Postby Andreas Rudolph » Sun 14. Apr 2013, 10:52

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...
Mit freundlichem Gruß / Yours sincerely
Andreas Rudolph
User avatar
Andreas Rudolph
 
Posts: 3737
Joined: Tue 16. Feb 2010, 21:48
Location: Berlin, Germany

Re: [PHP export] Custom stylesheets

Postby Eddy-R3 » Mon 15. Apr 2013, 11:06

Excellent thanks again Andreas! :) Worked out perfectly :D
Eddy-R3
 


Return to Programming

Who is online

Users browsing this forum: No registered users and 1 guest

cron