photo

Mike Bodamer

shared this question
3 years ago

Employees Involved

photo

PIV Support

Admin

Statistics

1
Comments
183
Views

Share

Tags

1
votes

tags not working in featured_listing_horizontal.html & CSS issues

Hello,

I am running OR 3.2.7 and I am messing with the templating of the site. I took a templatemonster template and I am trying to integrate OR into it. The issue I am focusing on currently is that I want a slide show on the top of the page that shows the featured listings. I edited the page to look and function how I intended with straight up HTML. I then cut that bit of functional HTML and put it into my featured_listing_horizontal.html page and then plugged in the OR tags I thought I needed to pull the info from the DB. I know I am loading the right file because it has my code and style but it seems as though none of the tags are working. These are the default tags that are already on that page. So I thought I screwed up the plugging in of the tags into my HTML. So I renamed my featured_listings_horizontal.html file and pulled the OR default one in and the same result happens. Clearly I have something else on my page that is conflicting and wont allow this to load properly. Funny thing is I also am calling the latest and popular listing files and they work fine.

The site I am working on is: http://www.elbow-cay.com/realestate

The second issue I am facing is if you look at that site you will see two search boxes on the right. The first one is nicely styled but doesnt work. The second one works like a charm but isn't styled. I styled the first one using the class in CSS however the functional search box already has a class and if I change it then I break the search box. So any ideas on that dilema and I would greatly appreciate it.

Thanks!

Add Comment

Comments (1)

photo Employee
1

1) OR's template engine does not render PHP code, you don't include OR's template files (or any content) via PHP include() or PHP unless you are doing so via an an add-on, and even then, anything you embed in OR's templates must be in the form of a template tag, JS/jQuery or HTML/CSS. Use the correct template tag from the docs: {featured_listings_horizontal} or similar:

http://docs.transparent-tech.com/open-realty/latest/featuredrandomtemplatetags.html

Also, when using javascript, you must make sure any opening and closing curly braces { } in your code do not occur on the same line, otherwise OR will treat it as a template tag, and when it does not match an existing one, everything within the braces and the braces themselves will be removed when the template engine parses the template.

eg:

  1. //bad
  2. $(document).ready(function(){myfunction();});
  3. //good
  4. $(document).ready(function(){
  5. myfunction();
  6. });

2) http://www.elbow-cay.com/realestate/ contains 6 markup errors, 2 of which may possibly be affecting your layout.

http://validator.w3.org/check?uri=http%3A%2F%2Fwww.elbow-cay.com%2Frealestate%2F&charset=%28detect+automatically%29&doctype=Inline&group=0

Leave Comment

photo

Attach files...

The file must be a jpg, gif, png, bmp, ico, pdf, doc, rtf, txt, zip or rar no more than 20M