jimie VIP
Total posts: 531
15 Авг 2014 07:53

Hello Sergey,

Can you help me with the code needed to display the "Submit review" button ( using Cobalt types as comments for reviews ) on a article page ?

Rgds

Последние изменения: 14 Окт 2014


Sergey
Total posts: 13,748
18 Авг 2014 04:21

Tyhere is parameter to change button label in comment configurations.


jimie VIP
Total posts: 531
18 Авг 2014 04:58

Hello Sergey,

What I want is the code to display the button in some other places when viewing article details, because on the bottom of article is not easy for people to find the button, and I want to place it also on other places in the article details.

Rgds


Sergey
Total posts: 13,748
18 Авг 2014 08:27

Copy button URL, then hide button and insert this URL where you want.


jimie VIP
Total posts: 531
18 Авг 2014 08:36

Yes, but imagine what happens when I have 1000 articels :) doing that manually everytime you get a new article is not good.


Sergey
Total posts: 13,748
20 Авг 2014 11:23

You can make it dynamic. The values in URL you can take from $item.

For ecample url is index.php?option=com_.......&record_id=100 you change it to index.php?option=com_.......&record_id=<?php echo $item->id; ?>


klox7 VIP
Total posts: 914
13 Окт 2014 15:53

@jimie did you manage to find in what file is code for submit review button?


jimie VIP
Total posts: 531
13 Окт 2014 18:28

Hello Klox

I`ve managed to do it with:

<?php
        $url = 'index.php?option=com_cobalt&view=form&field_id=15&Itemid=341&type_id=2&section_id=2';
        $url .= '&fand='.$item->id;
        $url .= '&return='.Url::back();
?>

then used:

<a href="/<?php echo JRoute::_($url); ?>" class="btm" rel="nofollow"> Submit </a>

Hope it helps you

Rgds


klox7 VIP
Total posts: 914
14 Окт 2014 08:16

Thanks, it does ;). I needed this $url .= '&return='.Url::back();. Rgds

Работает на Cobalt