eZ Community » Forums » Setup & design » Search results positioning
expandshrink

Search results positioning

Search results positioning

Wednesday 09 September 2009 2:58:29 am - 10 replies

How to direct search results to be displayed on frontpage center-column or other template, giving similar look?

Thursday 10 September 2009 9: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?

Thursday 10 September 2009 10: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.

Modified on Thursday 10 September 2009 10:48:39 pm by André R.

Friday 11 September 2009 3:10:56 am

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,

Monday 14 September 2009 3:15:45 pm

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

Monday 14 September 2009 3:19:46 pm

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.

Modified on Monday 14 September 2009 3:20:52 pm by Łukasz Serwatka

Monday 21 September 2009 7:00:15 pm

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?

Modified on Monday 21 September 2009 7:49:57 pm by Virgilio Lemos

Wednesday 23 September 2009 1:31:58 am

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?

Wednesday 23 September 2009 9: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...

Wednesday 23 September 2009 9: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...

Saturday 26 September 2009 7:31:46 pm

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.

expandshrink

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

36 542 Users on board!

Forums menu