Jump to content

Addons and index.php and setting an alternate index.php (like index2.php)


TheHackRepairGuy

Recommended Posts

Hi folks,

Ok, so I've been playing around with a number of Addons.

 

Problem with most is that they use index.php as their base (instead of clientarea).

 

Only problem, and I have to believe this is pretty common, is that my index.php, which leads off to header.php, is quite "heavy."

 

So there is a statement in header.tpl which we all love dearly:

{if $filename eq "index"}

 

Everything above this line is included on all pages (standard header, menu, et al), and everything below is the home page body.

 

So there lies the problem.

In an Addon like the excellent jetserver.net's CSF, which utilizes this statement to "include" the content for CSF:

example.com/index.php?m=csfmanager

you can envision the obvious problem.

 

Since index.php is called, and index.php simply sucks in the contents of header.tpl, and that statement:

{if $filename eq "index"}

essentially includes much of the home page content as well, you then get this bloated page, with lots of unnecessary stuff meant only for the "home page"

 

 

Thinking creatively:

I'm wondering if it might be possible to set up an index2 with it's own header2.tpl script associated with it, etc.

 

 

How is every one else handling is rather messy setup?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated