Menu

#16 Included file with non absolute path

0.2.*
open
bugs (17)
5
2009-06-16
2009-06-16
No

I've found some includes directives using non absolute file path... mainly referring to left.inc and right.inc. This could be correct but I think we must have a reason and a description for this.

We can leave left.inc and right.inc as non-absolute while having head.inc, top.inc, bottom.inc and footer.inc referred as absolute.... this could mean we can change left and right for each site section (folder) while the rest of the site is still consistent. Alternatively we can use non-absolute for left,right,top and bottom... leaving for customization of all this pieces on a per-folder basis....

The strange thing is all the right.inc inclusions are commented out and the right.inc file is empty......

Any explanation, idea or suggestion?

Discussion

  • Pino

    Pino - 2009-06-16
    • assigned_to: gcontartese --> cpiacente
     
  • Cristian Piacente

    The reason why i used some includes with absolute and some with non-absolute path is exactly the one you pointed out.
    If you have a project with more than 1 section you can customize some includes for each site section.
    If your project is not divided in sections then all non-absolute paths are resolved anyway without any problem.

    So i suggest to leave header.inc and footer.inc with absolute path,
    while top.inc, bottom.inc, left.inc,right.inc with non-absolute path.

     
  • Roberto Lo Giacco

    I completely agree with you, but we need to reintroduce the right.inc then and pheraps it would be clearer if we move those files out of the includes folder otherway we should instruct people to "clone" the includes folder for each nested folder they want to have....

     
  • Cristian Piacente

    Actually right.inc is used in list.jsp.
    It's commented out in edit pages because the right section is generated starting from the collection properties of the current class.

    And i agree with you to move top.inc, bottom.inc, left.inc,right.inc to the main web folder.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.