Forums / Developer / Caching problem.. / Comment46826

Author Topic

Claudia Kosny

Wednesday 20 September 2006 12:58:41 pm

Comment46826

Hmm, I am not sure whether this is a bug or whether view_parameters are only provided by the module responsible for viewing content. I suggest to file a bug report about the disappearing view_parameters and see what happens.

So at the moment it looks like there is no way to do what you want to do in the way that you are doing it as long as caching is enabled (which it should be).
The only way out I can see right now is to put the code in another template which is called like anode template. Depending on how your main page is supposed to look like there are two variations:
If your entire startpage consists of the listing and no other dynamic content and the listing is not supposed to appear on any other pages, just put your code into an override for node 2 (or whatever you starting node is). There you can use $node.node_id and everything should be fine.
If the listing is supposed to appear on all pages you need to include the listing template on all templates you use and replay the offset to the included template. Unfortunately this can be a nightmare with regards to design and maintenance so hopefully some has a better solution...

Alternatively you might need to change your site concept a bit. Display only the first few items on the frontpage and provide a link to another page which shows all items. This is the easiest solution and fairly standard for EZ so you should not run into any problems there.

Good luck

Claudia