Jump to:

22977 Posts in 11806 Topics by 2826 members

General Questions

SilverStripe Forums » General Questions » Facelift image replacement in SS?

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1 2
Go to End
Author Topic: 3027 Views
  • VanceK
    Avatar
    Community Member
    17 Posts

    Facelift image replacement in SS? Link to this post

    I've used the the Facelift Image Replacement [http://facelift.mawhorter.net/] code in non-SS projects before and would like to impliment it in a SS site. So far I've been unable to get it to work properly. Has anyone tried this or something similar? I've tried the siFR module but never got that one working right either.

    Thanks for any help.

  • VanceK
    Avatar
    Community Member
    17 Posts

    Re: Facelift image replacement in SS? Link to this post

    Just an update.

    I stumbled upon the Font Squirrel website [http://www.fontsquirrel.com/], downloaded some of their "@font-face kits" and gave them a try. They seems to work fine in the browsers I've tested in, with far less hassle, so I think I may go this route, rather than using image replacement.

    Still, if anyone has any experience with image replacement in SS I'd be interested in hearing about it!

    Thanks!

  • stallain
    Avatar
    Community Member
    61 Posts

    Re: Facelift image replacement in SS? Link to this post

    Another font replacement technique you could use is cufon : you just add a few js tags and it works well with SS.

  • VanceK
    Avatar
    Community Member
    17 Posts

    Re: Facelift image replacement in SS? Link to this post

    Thank you, stallain! I'll check it out!

  • VanceK
    Avatar
    Community Member
    17 Posts

    Re: Facelift image replacement in SS? Link to this post

    After a bit of playing around I got cufon working. The results are very satisfactory. Thanks again stallain!

  • growin
    Avatar
    Community Member
    41 Posts

    Re: Facelift image replacement in SS? Link to this post

    I've been trying to get font-face working on default SS blackcandy for the past few days without success. I must be missing something. Any simple instructions to help me along?

  • VanceK
    Avatar
    Community Member
    17 Posts

    Re: Facelift image replacement in SS? Link to this post

    Here's what I did:

    First I downloaded a font-face kit from Font Squirrel [http://www.fontsquirrel.com/fontface]. I unzipped it and put the stylesheet.css file in my themes css directory [themes/myTheme/css] and the font files into a directory I created in my theme path [themes/myTheme/fonts].

    I then edited the stylesheet.css file and inserted the relative path to the font directory into all the url properties [url('../fonts/fontname_-webfont.eot'); etc.]. I also made note of the font name used in the font-family property.

    Then, within my layout.css stylesheet [themes/myTheme/css/layout.css] I inserted '@import url("stylesheet.css");' at the top.

    After that all I needed to do was add the 'font-family' property using the font name from stylesheet.css to whatever style selectors I wanted to change.

  • growin
    Avatar
    Community Member
    41 Posts

    Re: Facelift image replacement in SS? Link to this post

    Thanks VanceK!

    I think I used <% require themedCSS(stylesheet) %> on page.ss instead of '@import url("stylesheet.css");' on layout.css thinking it would work. I appreciate the description as I spent about 3 solid days trying to figure this out, but learned along the way. Hopefully this works.

    3027 Views
Page: 1 2
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.