Slash Boxes

Slash Open Source Project

This discussion has been archived. No new comments can be posted.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login
Loading... please wait.
  • by (2154) on Wednesday October 31 2001, @11:35AM (#3570) Homepage Journal
    I just updated my test site and templates (the way it looks) got screwed up.

    I have a simple question.

    why have you (C taco) mixed the html that makes up the page and code that makes up the content?

    If you give a block of code a name and include ( some specific tag) this name somewhere in html then the slash-engine will run the code -> builds the content -> wraps the result in html and serves the page.
    It will be so easy to update the code. because it will not screw up any html around it.

    lest say I have something like this. (HTML - this is my html code and it is what ever it is) CODE is your slashcode that builds a specific part of the page or story or what ever)

    a. <HTML blaa blaablaa> <CODE-STORY><HTML balaa blaa balaaa>
    but slascode now is more like
    b. <HTML blaa CODE-HTML-blaa-STORY blaa blaa HTML>
    what happens is in example a. you upgrade the code behind CODE-STORY and HTML part will be like it wazz.
    in example b. you have to replace everything because code an html are mixed together.

    actually the portald box works almost like this!?
    • portald? checkout the latest version of slash, I think you'll like it.

      I don't understand what you're referring to with your example up there. Can you be more specific?

      Personally, compared to 1.0, 2.1 has most of the code and html uncombined. I think there may be a few cases (the daily mailing maybe) where html is still in part of the code (so it's not using a template, when it should be) but that's few and far between.
      lottadot []
      • Submit a patch :)
        I would love to see most of that in templates.

        You can't grep a dead tree.
      • ok . let me be more specific
        lets take a header for example:
        what I am trying to explain/ask is this:

        lets say you write a update for ?mainmenu?.
        I have written a whole bunch?a html code that makes up my header and so on.
        <!-- start header
        blaa blaa my ugly html and so on

        <!-- begin mainmenu block -->
        [% PROCESS mainmenu %]
        <!-- end mainmenu block -->

        blaa blaa blaa my super cool html and so on ...
        end header-->

        now why is update replacing also the html in this template?
        only thing that actually must be updated is the code that makes up the mainmenu - and this code is not here!

        after update ...damn there is a bred crumb under my ?e? key ...rrr.. so after the update in this template is the same.

        so weh have :

        -----------------    -----------------   ---------
        |     html        |  |   code         |  | html  |
        -----------------     ----------------    ---------
        | blaaa           |  | /)(/(¤#/¤(?)(  |  | blaaa |
        -----------------     -----------------   ---------
        • Then either your apache/mod_perl/sql is screwed up, or you're doing something wrong. Did you read through the docs []? Because:

          1) the main on the front page is a *template*.

          2) portald/slashd does NOT, by default, modify
                the template mainmenu;misc;default.

          So if you've modified that template, either

          1. You didn't save it.
          2. You saved it, but have never restarted apache or lowered your block_expire var
          3. your box is screwed up.

          If I were you, i'd use the template-tool, dump the main menu template, edit it, and import the newly-editted file back into the site. then restart apache. then look at your changes. if they're there, you're box is ok. if they're not, then something's up.

          lottadot []