PassMark Logo
Home » Forum

Announcement

Collapse
No announcement yet.

Modification to template.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Modification to template.

    I think it would be better if Zoom “included” the template around the zoom code rather than reading it in the way it does. It would need to include two of course, one before the Zoom script and one after.

    include(template_header);
    // zoom generated html
    echo "blah";
    echo "blah";
    // end of zoom generated html
    include(template_footer);

    The way it does it now, the template must be html, but if split into two and included it, it could contain more advanced script.
    The layout for my site is defined by a series of PHP include files – which currently can not be used with Zoom. This means that the Zoom template is effectively hard coded and will need to be individually modified if there are any changes to my site. If Zoom included the template, then any changes to the site would be instantly reflected in the Zoom template.

    I know this is a fairly large change, I guess I might get round to doing it myself..ha ha! Although many people may not require this, it ceratinly would make maintenance of my site much easier.

  • #2
    I would *DEFINITELY* appreciate the ability to do this.

    In fact, I've been planning on suggesting this feature myself but just haven't gotten around to it yet

    Comment


    • #3
      Actually, I have just realised that it is a really simple change. The code is doing no more than reading in the template and printing it up to the zoom marker, then it does the same for the footer. This would be very simple to replace with two include statements.

      Comment


      • #4
        There is no need to change the way Zoom works.

        What you want has always been possible.

        See this FAQ question for details,
        http://www.wrensoft.com/zoom/support/faq_ssi.html

        ----
        David

        Comment


        • #5
          Yes, but I have to say that I am still in favour of the change to Zoom. The overall solution is simpler.

          Comment


          • #6
            The disadvantage with doing it your way is that it requires the page template layout to be easily seperated into a header and footer. This is not always the case especially with many website editors out there which expects to be designing a full page. Most users also appreciate the fact that they can design the search template as a single page rather than two seperate sections.

            As pointed out above howerver, what you wish to do is easily achievable as well. The methods are explained on the FAQ page linked above. I'm not sure as to why you think the solution is any more complicated, it involves the same two lines to make a call to include the header and footer, and just one extra line to include search.php. That's 3 lines in total.

            The benefit of this method is that you would not need to modify "search.php", which may get updated in future builds with bug fixes or new features. Otherwise, you would need to port your changes over to each new build you wish to upgrade to.
            --Ray
            Wrensoft Web Software
            Sydney, Australia
            Zoom Search Engine

            Comment

            Working...
            X