CSS Styles and Array for Search Results

More
11 years 8 months ago #1248 by kaya
Hello,

working with CP, I have two problems, I don't know how to solve.

I have two CP search modules (Dates/Teacher).
For the first one, I need a result-order by "earlierst first" (as it is now), but all
teacher names have to be arranged alphabetical.
I found this one:
solidsystem.it/how-to-and-tutorials/166-...stom-properties.html
but I don't know, what to change in alt.php. Or is there another way?

Next question is:

Is it possible to create to different css styles for THE RESULTS.
I tried "Module class suffix" but it only works for the module itself, not for the results.
I would like to show the titel in "Teacher"-results and hide it in "Dates"-results(or modify it).
I changed cp_title (display:none) but then both titles are not shown.

Thank you for your support.

kaya

Please Log in or Create an account to join the conversation.

More
11 years 8 months ago #1250 by andrea_4g
Replied by andrea_4g on topic CSS Styles and Array for Search Results
Results ordering is set at component level only. There are no parameters at module level to set different orderings for results.

The "tutorial" you are referring to, helps solving the second issue about formatting.
solidsystem.it/how-to-and-tutorials/166-...stom-properties.html

You need to have 2 different templates, for example:
- default.php (for dates)
- teachers.php

You then give a different, harcoded, CSS class to the second template. E.g.
change line 377 of teacher.php from:
Code:
<div class="blog<?php echo $this->params->get('pageclass_sfx');?>">
to
Code:
<div class="blog teachers">

Last step: configure each cp_search module to use a different template when dispalaying results setting the relevant 'Template' parameter in module config.

Please Log in or Create an account to join the conversation.

More
11 years 8 months ago #1251 by kaya
Replied by kaya on topic CSS Styles and Array for Search Results
Thankx, it works.

Please Log in or Create an account to join the conversation.

Time to create page: 0.160 seconds