+ Reply to Thread
Page 1 of 3 123 LastLast
Results 1 to 10 of 22

Thread: Moving the "add to the comparison table" next to the listing title

  1. #1

    Moving the "add to the comparison table" next to the listing title

    I am using the compare plugin and would like to move the "add to the comparison table" button from the listing details next to the listing title where it should be (along the "add to favorites" and RSS icons).

    This means I had to move {rlHook name='listingDetailsPreFields'} from listing_details.tpl to content.tpl. However now I need to prevent it from displaying unless the listing detail is being displayed. I guess something like this should do the trick:

    {if $pageInfo.Key == 'view_details'}
    {rlHook name='listingDetailsPreFields'}
    {/if}

    ...but this is not the right page key I need to use. Any hints or tips? Thanks!

  2. #2
    It seems it is not that simple because the info is missing to identify the listing info if moved to content.tpl. More digging will be needed...

  3. #3
    Just realized, the proper way would probably be to hook the compare button to pageNavIcons hook rather than listingDetailsPreFields one.

  4. #4
    Hello,


    Better not move any hooks to different places. Also it will not work with just changing name of hook as its different places and should be adapted.
    Easiest way is to add entry to the navIcons array in php and disable existing compare icon

    open includes/contollers/listing_details.inc.php

    find code and do the same for the compare button

    Code:
    Only registered members can view the code.

    then you have to deactivate listingDetailsPreFields hook

    run following sql query or change status of hook to approval through the phpmyadmin


    Code:
    Only registered members can view the code.

  5. #5
    Hello Mike and many thanks for getting me on the right track!

  6. #6
    Huh, I have put everything as it was for the moment, but it looks like I #$%" something up. If I add the listing to the comparison table (from the listing details) the info is there except for the listing title which is "null". Works fine from other areas.

  7. #7
    To answer myself, and it may be helpful for the others. As I was weeding out all the table based layouts, including the one from listing_details.tpl, i removed the td with class "content". The comparison plugin is expecting the div with the "content" class along with the td with the "content" class, and is looking for the string within h1 tags. As I removed the td, it was unable to find it. I modified the plugin javascript, so be warned when modifying the template.

  8. #8
    Great that you sorted it out ). Yes there are lot of relations between html class names, ids and javascript code

  9. #9
    Got that...thinking that there must be a better way to collect the needed info, this way one can break the javascript by modifying the template.

  10. #10
    How do I put it on a featured listings box on my homepage please?

+ Reply to Thread