Share » Forums » Setup & design » Template search override by section...

Template search override by section id don't work in ez 4.4

Template search override by section id don't work in ez 4.4

Wednesday 17 November 2010 8:45:47 am - 10 replies

Author Message

Ivo Lukac

Wednesday 17 November 2010 10:39:09 pm

Hi Daniele,

Could be a bug, but could also be a template location problem. From version 4.x (not sure from which minor version) all templates in override.ini need to be in override folder, all other should be in templates folder. So check your template location.

http://www.linkedin.com/in/ivolukac
http://www.netgen.hr/eng/blog
http://twitter.com/ilukac

Daniele Nocentini

Thursday 18 November 2010 12:10:21 am

Hi Ivo,

the template location it's right because I have developed template search in a ezpublish 4.2 and the override works than I have upgrade to ezpublish 4.4 and the override don't works. So I try my template and override in two anothers ezpublish 4.4 and override don't works, move again to a old ezpublish 4.2 and works.

I think it's a bug because I see that in ezpublish 4.4 there is a new field in table ezsection called "identifier" for section.

Antica Bottega Digitale srl
http://www.abd.it

Gaetano Giunta

Thursday 18 November 2010 2:02:38 am

Might be because in 4.4 there is no session created for anon users.

Thus when they get to content/search, the information about the section of the node they last visited is lost.

Try to:

- either add a view param in your links to search that adds the section ID, and use {if} in your templates (bleagh)

- or enable again sessions for anon users (but not sure it will be enough)

Btw, this was iirc documented in the docs/bc file

Principal Consultant International Business
Member of the Community Project Board

Ivo Lukac

Thursday 18 November 2010 3:15:33 am

If you still experience problem don't forget to file a bug to issue tracker....

http://www.linkedin.com/in/ivolukac
http://www.netgen.hr/eng/blog
http://twitter.com/ilukac

Daniele Nocentini

Thursday 18 November 2010 5:59:22 am

I have a node view full template with form to search and I need a custom template search for a specific fetch function.

How can I reach the section id if I cannot to use my custom template and ezpublish want to use standard template?!

I never disabled any configuration for anon users, I want to return to ezpublish 4.2 configs.

Antica Bottega Digitale srl
http://www.abd.it

Ivo Lukac

Thursday 18 November 2010 6:22:55 am

Can you paste your override.ini configuration here?

http://www.linkedin.com/in/ivolukac
http://www.netgen.hr/eng/blog
http://twitter.com/ilukac

Daniele Nocentini

Thursday 18 November 2010 7:03:33 am

this is my override, it's the same as ezpublish 4.2 I have only update to ez 4.4 and don't works.

[search_topdealer]
Source=content/search.tpl
MatchFile=search/search_topdealer.tpl
Subdir=templates
Match[section]=9

Antica Bottega Digitale srl
http://www.abd.it

Ivo Lukac

Thursday 18 November 2010 7:07:42 am

Hm,

I must say I would never do that like this :)

Why don't you check in your full template in which section you are in and then include the right search template?

http://www.linkedin.com/in/ivolukac
http://www.netgen.hr/eng/blog
http://twitter.com/ilukac

Daniele Nocentini

Friday 19 November 2010 1:12:09 am

ok try this,

install ezpublish 4.4 and add this override rule on site access of ezwebin and specify section 1, go to a home node of ezwebin site and make a search,

you can see that ezpublish still load a standard template instead the overrided template.

Antica Bottega Digitale srl
http://www.abd.it

Ivo Lukac

Friday 19 November 2010 3:01:44 am

ok try this,

install ezpublish 4.4 and add this override rule on site access of ezwebin and specify section 1, go to a home node of ezwebin site and make a search,

you can see that ezpublish still load a standard template instead the overrided template.

It is not that I don't believe you :) just saying that this is not the way that I would do that....

Commit a bug.

http://www.linkedin.com/in/ivolukac
http://www.netgen.hr/eng/blog
http://twitter.com/ilukac

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu