Share » Forums » Setup & design » Search results positioning

Search results positioning

Search results positioning

Tuesday 08 September 2009 5:58:29 pm - 10 replies

Author Message

Virgilio Lemos

Thursday 10 September 2009 12:02:23 pm

Search box is located in page-head area and displays the results in the left of body area.

As I need to use side and extra areas, I need to know if is there any way to force the results to be displayed in center-column of the body area.

Any help?

André R.

Thursday 10 September 2009 1:47:44 pm

search is a custom view (content/search) so it's not content you can move around.
To be able to add left menu and right menu in search view you'll need to override the search template* and include the code you need there, like done in frontage** content.

* In ezwebin the template (templates/content/search.tp) is placed in:
extension/ezwebin/design/ezwebin/templates/content/search.tpl

** In ezwebin the override template (templates/node/view/full.tpl) is in:
extension/ezwebin/design/ezwebin/override/templates/full/frontpage.tpl

Use site.ini[TemplateSettings]ShowUsedTemplates & DevelopmentMode to see witch template is used in your install, but remember to temporary disable cache to be able to see it all the time.

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Virgilio Lemos

Thursday 10 September 2009 6:10:56 pm

André,

The search existing in the admin interface displays the results in a way very similar to what I need.
What are the related templates?

Best Regards,

Virgilio Lemos

Monday 14 September 2009 6:15:45 am

Anybody could help me telling me what are the templates used in admin interface to displays the search results or where there is a ezwebin template list documentation so I can help myself?
Regards

Łukasz Serwatka

Monday 14 September 2009 6:19:46 am

Admin template: design/admin/templates/content/search.tpl
ezwebin template: extension/ezwebin/design/ezwebin/templates/content/search.tpl

As AR mention above you should have enabled list of used templates in the debug output. Check his last post for more details.

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Virgilio Lemos

Monday 21 September 2009 10:00:15 am

I still with the same problem for a long time.
Maybe if I explain better the problem somebody could help me to solve it.

I need to integrate the search results into one existing page, but the result is always displayed in a new page, erasing everythig displayed before.

I'm using a frontpage content with the 3 columns of the EzPublish basic design and the results should be dispalyed in the center column, preserving what is dispalyed on the other columns.

The search form is still in the head of pagelayout.tpl and the search.tpl was customized to display the results in central column, but erases the other columns content.

Any idea to solve this?

Virgilio Lemos

Tuesday 22 September 2009 4:31:58 pm

The lack of response makes me imagine that there are no way to do this in EzPublish and start looking for another CMS like Joomla!, that offers this fuctionality in its basic implementation.

I'm I wrong?

Gaetano Giunta

Wednesday 23 September 2009 12:53:04 am

As far as I have understood it, it should be possible to achieve what you want, but in a slightly convoluted way.

You could:

A) show search results as a tiny part of a frontpage page layout

- post to the content/search url an extra parameter in your form, with the node_id of the current node

- the search template does its search stuff, and at the end, if that param was found in the post variables, includes the template of the full view of the original node, passing to it the search results as an extra parameter in node_view_gui

- the template used for your full view of the node would then show the search results in a dedicated space

B) move the columns outside of the node template and into the pagelayout template. This way they will be shown by default on every page. Add in the column templates the logic to customize them as needed (and possibly some cache-block to speed them up). Use a single-column layout for your frontpage

This is by far the most common approach...

C) variation of the above: put the columns in 2 separate templates, and include them both in your node template and in your search results template. The main difference is that the columns here will be calculated at the time the object shown is edited, but they will not be updated with fresh content on their own...

Principal Consultant International Business
Member of the Community Project Board

Gaetano Giunta

Wednesday 23 September 2009 12:54:45 am

ps: in the admin templates the lateral columns are not done via using a frontpage object, that's probably the point you are missing: frontpages are not design to add lateral columns that are available site-wide...

Principal Consultant International Business
Member of the Community Project Board

Virgilio Lemos

Saturday 26 September 2009 10:31:46 am

Gaetano,
I'm trying to implement your option A.
Could you please helpme with the node_view_gui for a root frontpage (node 02)?

{def $my_node=fetch( 'content' 'node', hash( 'node_id', 02) )}
{node_view_gui view='full_frontpage' content_node=$my_node parameter=($search_result)}

As there are no frontpage function in content module, what is the correct code?

Ps. I'm not trying to use the extra areas but the frontpage left and rigth columns, displaying search results in its center column.

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

36 542 Users on board!

Forums menu