+ Reply to Thread
Results 1 to 6 of 6

Thread: lightening up code

  1. #1
    Join Date
    Oct 2006
    Location
    Alpharetta
    Posts
    4,397

    Default lightening up code

    ok. I'm sort of a newbie here, but, for the others out here like myself that are using REW websites, I have discovered a way (ok, I said I discovered. Not that this is a new concept to some of you) to lighten up code on our sites by creating our own snippets and in some cases remove duplicate content. Let me try to expand. I have buttons on my site inside the test area. You can click on the links in my signature and see them. For the most part that bit of code is exactly the same escept for which img is called up. Instead of leaving this code on my site, I copied and pasted it into a new snippet through the CMS and called the new snippet #atlantabuttons#. This allowed me to remove that code from each page of my site. I did the same thing with all of the maps that display on different pages.

    What other things are you guys doing to eliminate dup content and lighten up your code?

    Hey can you guys move this? I put it in the wrong forum!!!!

    Thanks!
    Last edited by Ryan Ward; 07-08-2007 at 05:11 PM. Reason: I'm stupid!
    For up to date information about the Atlanta real estate market, please visit my Atlanta Real Estate blog. I live in Alpharetta and love to talk about and sell Alpharetta real estate. I am a Member of the Institute for Luxury Home Marketing and I am a Certified Luxury Home Marketing Specialist. I also belong to the Atlanta homes of Distinction.

    Ryan Ward - REALTOR®, CDPE, CLHMS, ILHM
    Premier Atlanta Real Estate - Keller Williams Realty Consultants.
    Direct: (404) 630-3187

  2. #2
    Join Date
    Apr 2004
    Location
    Nanaimo
    Posts
    15,992

    Default Re: lightening up code

    Ryan,
    I hate to kill your enthusiasm, but I think you misunderstand how snippets or includes work. They are not like sourcing css or js documents externally, it just means the html is stored in a single place for ease of access instead of having to re-type it each time. However, when you use a snippet #snippet# you are in essence including that html back into the page, so even though in the CMS when you see your page, it shows you have less html, when you view the source of the page through a browser, you will see that the snippet SSI has been processed and there is no difference in the hmtl output.
    Man did I ever just sound nerdy there.
    Starting LEC 7 soon but it won't be called LEC 7 - LEC 2012 coming soon!

  3. #3
    Join Date
    Oct 2006
    Location
    Alpharetta
    Posts
    4,397

    Default Re: lightening up code

    So why do have to go around bursting peoples bubbles? Oh well. It seemed like a good thought.
    For up to date information about the Atlanta real estate market, please visit my Atlanta Real Estate blog. I live in Alpharetta and love to talk about and sell Alpharetta real estate. I am a Member of the Institute for Luxury Home Marketing and I am a Certified Luxury Home Marketing Specialist. I also belong to the Atlanta homes of Distinction.

    Ryan Ward - REALTOR®, CDPE, CLHMS, ILHM
    Premier Atlanta Real Estate - Keller Williams Realty Consultants.
    Direct: (404) 630-3187

  4. Default Re: lightening up code

    Thanks for the clarification Morgan.

    I've been using snippets for various things and wondered what the heck you were talking about Ryan. I guess it goes to show how much I trust your judgement as I assumed you were right and I needed to figure out what I didn't know!
    •:*¨¨*:• Richland Wa Homes | Kennewick Homes | Pasco Wa Homes •:*¨¨*:•

  5. #5
    Join Date
    Oct 2006
    Location
    Alpharetta
    Posts
    4,397

    Default Re: lightening up code

    Trust my judgment with websites? Now, I won't even do that! For some reason I thought it popped it up into a file or something and pulled from there not put it back on the page.
    For up to date information about the Atlanta real estate market, please visit my Atlanta Real Estate blog. I live in Alpharetta and love to talk about and sell Alpharetta real estate. I am a Member of the Institute for Luxury Home Marketing and I am a Certified Luxury Home Marketing Specialist. I also belong to the Atlanta homes of Distinction.

    Ryan Ward - REALTOR®, CDPE, CLHMS, ILHM
    Premier Atlanta Real Estate - Keller Williams Realty Consultants.
    Direct: (404) 630-3187

  6. #6
    Join Date
    Apr 2004
    Location
    Nanaimo
    Posts
    15,992

    Default Re: lightening up code

    It does pull from somewhere else, but it is done server side before processing, it has to, browsers cannot render html sourced externally
    Starting LEC 7 soon but it won't be called LEC 7 - LEC 2012 coming soon!

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts