Jump to content

is home page?


Saulyx

Recommended Posts

Hey guys,

 

Quick question, how can I determine if the page is home page?(for he tpl files)

 

Also how can I turn off cache? As im doing template editing

 

Also is there a main layou file that I can edit? like the file that includes header, footer, and main page body? as I want to add a file for sidebar and have it included only on some pages and not all(as now its in the header)

 

Thanks,

S

Link to comment
Share on other sites

You can check for the homepage using

$smarty.server.PHP_SELF != '/index.php'

 

If you use this check in header.tpl you will be able to optionally include the sidebar by checking which template you're currently in.

 

You don't need to turn off caching. If your template files change then they are used instead of the cached copy (i.e. when the template hasn't changed).

Link to comment
Share on other sites

You can check for the homepage using
$smarty.server.PHP_SELF != '/index.php'

 

If you use this check in header.tpl you will be able to optionally include the sidebar by checking which template you're currently in.

 

You don't need to turn off caching. If your template files change then they are used instead of the cached copy (i.e. when the template hasn't changed).

 

Thank you for the first suggestion, will try that,

 

However caching doesnt seem to work that way as if I change the file it still doesnt change(even after pressing F5), I have to delete the files myself, the auto reload seems to only apply to style sheets(which is udnerstsndable as it looks like they dont get cached,

 

 

Any other options?

 

 

Thanks,

Saulius

Link to comment
Share on other sites

that code doesnt seem to work? Im including it in the header? got a code

 

{if !$loggedin && $smarty.server.PHP_SELF == '/index.php'}

 

however it shows it on all pages,

 

And as for the caching it doesnt seem to work that way for me

 

 

Thanks,

Saulius

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