Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Template Questions /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

include does not work


Go to End


6 Posts   3892 Views

Avatar
janulka

Community Member, 80 Posts

22 January 2009 at 9:22pm

Hello,

I have file called Navig.ss in "Includes" folder, then I call it from Page.ss using <% include Navig %>, but it does not show up.

It is perfectly ok when the full code is on Page.ss

I am using "mysite" -> "templates" folder, with _config.php in mysite folder defining global $project; $project = 'mysite';

btw $Layout works perfectly

thanks for help

Avatar
OscarGodson

Community Member, 9 Posts

22 January 2009 at 11:09pm

Are you flushing your templates?

e.g. mysite.com?flush=1

Also, if that doesn't work, try that AND in Firefox do ctrl+shift+r or cmd+shift+r to clear the cache. In Safari try just clearing the cache.

Avatar
janulka

Community Member, 80 Posts

23 January 2009 at 9:39am

yep, that did it.. i should have thought about that.

thanks a lot! :)

Avatar
OscarGodson

Community Member, 9 Posts

23 January 2009 at 2:22pm

The caching seems to always make things more time consuming then time saving. I wish there was a way to just turn it off as clients always seem to have trouble with it and loading times are so fast anyways.

Avatar
Fuzz10

Community Member, 791 Posts

23 January 2009 at 9:11pm

You can kinda' turn it off :

put this line in your _config.php

HTTP::set_cache_age(0);

Avatar
Nivanka

Community Member, 400 Posts

24 January 2009 at 3:18pm

Includes do a lot of caching. So you will have to flush each and every time you update them.