Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: URL based template switching

  1. #1
    Join Date
    Mar 2007
    Posts
    10

    Question URL based template switching

    Can anyone help me with a template issue?

    Basically I want two templates to be used on my site. For example, lets say that when people land on my home page they see the Lazuli template. But when they click on any of the other links they will see the city_lights template.

    The reason is, I want a different layout for my home page than the rest of the pages. I have my own template layouts - I was just using the OR templates for example purposes.

    I did do some searching and fourd & read this post from PBflash but it was posted back in 2004...

    http://support.open-realty.org/showt...late+switching

    what would be the best way to do this.

    thanks.

  2. #2
    Join Date
    May 2004
    Location
    Long Island, NY
    Age
    49
    Posts
    9,796

    Default Re: URL based template switching

    The best way to do it would be a seperate main.html file for your homepage.

    Read number 5 on this page.

    http://wiki.open-realty.org/Template...Main_Templates

  3. #3
    Join Date
    Mar 2007
    Posts
    10

    Default Re: URL based template switching

    Cool, I read the template documentation you suggested and the page#_main.html optional file sounds like it will work perfectly.

    I will give that a try.

    Thanks.

  4. #4
    Join Date
    Mar 2007
    Posts
    10

    Thumbs up Resolved: URL based template switching

    Yes it worked like a charm. The cool thing is that now I can have as many templates as I want. I only need two - but this does open the door to being able to have multiple layout styles based on the WYSIWYG pages.

    Thanks again.

  5. #5
    Join Date
    Feb 2008
    Posts
    115

    Default Re: URL based template switching

    Can this be done with the listing detail page? Like this... listingdetails_main.html

  6. #6
    Join Date
    Jan 2009
    Location
    UK-Spain
    Posts
    14

    Default Re: URL based template switching

    MODERATED - Core file changes can only be posted in the sandbox area.

  7. #7
    Join Date
    Feb 2008
    Posts
    115

    Default Re: URL based template switching

    MODERATED - Core file changes can only be posted in the sandbox area.


    That worked. I just made the following changes to the first line of code -(listing_details_main.html) However, the listing tags don't show any values except for the listing Id. Any idea what's going on?

  8. #8
    Join Date
    Jan 2009
    Location
    UK-Spain
    Posts
    14

    Default Re: URL based template switching

    Copy/paste the original code from the original file at:

    /template/your_template/listing_detail_default.html

    into the new listing_detail_main.html template and see if that makes a difference.

  9. #9
    Join Date
    Feb 2008
    Posts
    115

    Default Re: URL based template switching

    actually... that's the first thing I did.

  10. #10
    Join Date
    Feb 2008
    Posts
    115

    Default Re: URL based template switching

    anything else I can check?

Similar Threads

  1. Switching URL type to Search engine Friendly
    By waxtrax in forum Installation/Configuration Help (CLOSED)
    Replies: 6
    Last Post: 05-30-2008, 07:19 PM
  2. PbFlash TemplateChanger choose template based on agent
    By Andrea80 in forum Addon help, ideas and discussion (CLOSED)
    Replies: 3
    Last Post: 02-20-2007, 01:29 PM
  3. Switching to Generic
    By shawnb82 in forum HELP (CLOSED)
    Replies: 2
    Last Post: 06-22-2005, 02:12 PM
  4. Switching tables
    By bananahammock in forum Templates for v 1.x (CLOSED)
    Replies: 4
    Last Post: 04-14-2005, 12:21 AM
  5. viewimages in listingview without switching pages
    By wcardinal in forum HELP (CLOSED)
    Replies: 8
    Last Post: 09-11-2003, 03:56 PM

Bookmarks

Posting Permissions

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