#014295: Impossible to use persistent variables in content/search

Description:

Persistent variables set in content/search.tpl are not usable in the pagelayout.


Environment:

Operating System:
PHP Version: (please be specific, like '4.4.3' or '5.1.5')
Database and version:
Browser (and version):


Steps to Reproduce:

1. Set persistent variables in an override of content/search.tpl, for exemple :
2. Try to use those persistent variables in the pagelayout.tpl when calling content/search view


- Attachments

No attachments for this issue.


- Comments

persistent_variable is a content/view specific feature, content/search is not cached so it should be possible to 'leak' global variables from view to pagelayout.
So what do you need it for?

#259844 by André R. on January 19th, 2009 [Permanent Link]

I've just read again the documentation, and you're right, it's an enhancement not a bug. I use the persistent variables to generate the title and the meta description from the view to avoid fetching nodes to generate the <head> section of my pages.

As I use it with content/view, I'd like to use it with content/search too so that I can have a SEO optimized title and meta description without any code change in my pagelayout and with some data used or computed in the template of the view (number of result, title of the displayed result, ...)

IMHO, it would make sense that persistent variable is *the* way to communicate between the template of the view and the pagelayout without using the "leak" you mentioned that is more a side effect than a real feature, no ?

#259847 by Damien Pobel on January 19th, 2009 [Permanent Link]

IMHO, it would make sense that persistent variable is *the* way to communicate between the template of the view and the pagelayout

That would be nice, but all view's will need to be changed to be able to accomplish that, including view's in extensions as well..

without using the "leak" you mentioned that is more a side effect than a real feature, no ?

true, and looks like it was fixed in ~3.9 so don't look like this is possible anymore.
#259855 by André R. on January 20th, 2009 [Permanent Link]

Won't implement this in a direct way as it will as stated above involve changing all views, but you can now do the same thing using functions included in ezwebin 1.4, see here:
http://issues.ez.no/IssueView.php?Id=14193&activeItem=1&url

#260263 by André R. on February 13th, 2009 [Permanent Link]

This issue has been evaluated as outdated, hence I move it from Code Review to Closed. Workaround described in last comment.

Geir Arne Waaler
eZ Documentation

#271162 by Geir Arne Waaler on October 12th, 2011 [Permanent Link]

- History
Properties
Type Enhancement
Priority Medium
Components Search
Template language
Affects 4.0.1 - 4.0.1release
4.1.0alpha1
Fix Version -
Reporter Damien Pobel
Responsible André R.
Status 0 Closed
Resolution Won't Implement
Created January 19th, 2009
Updated October 12th, 2011
Resolved February 13th, 2009
 
Navigation [Permanent Link]
Previous Issue
Back to Issues List
Next Issue: #019127
  DB Deadlocks on ezcontentobject_tree when updating subnode