maleli VIP
Total posts: 87
03 Июнь 2014 15:32

I'd like to be able to modify the text displayed in each subscription on the list in this page:

In my site, each subscription is related to one k2 article's fields. So it would be much more user friendly if a user could go to their subscriptions and click on it and get the content they subscribed for.
I understand emerald works with different kinds of subscriptions for different kinds of content and components, so I guess an automatic link to the content might not be possible, but I could achieve what I need by just being able to manually place a link that's displayed on the "my subscriptions" list.

Последние изменения: 24 Июнь 2014


Sergey
Total posts: 13,748
04 Июнь 2014 10:32

Yes you can do that.

Create layout override for views/emhistory/tmpl/default.php and you can edit it as you want and still update Emerald every week.


maleli VIP
Total posts: 87
04 Июнь 2014 16:18

Thanks, I see there is a item-> note there, maybe I could use that by inserting a link there. Couldn't find the note field in the plan configuration, where can I set it?


maleli VIP
Total posts: 87
04 Июнь 2014 17:12

I also tried retrieving the description in the meantime, but nothing shows:

<?php echo $item->description;?>

Sergey
Total posts: 13,748
05 Июнь 2014 11:27

note is used for payment gayeway messages. You should not use it.

Just try var_dump($item) to see all available properties.


maleli VIP
Total posts: 87
05 Июнь 2014 21:04

Thanks. Sorry, I see it listed there as "description" but I just can't retrieve it.

I tried this:

<?php echo $item->description;?>

but nothing shows.

I am able to retrieve other variables but not the description. What code do I need in order to display it?


Sergey
Total posts: 13,748
05 Июнь 2014 23:35

The is no description in the user subscription. I do not know where you take it from. You canonly use what is already used in template. If you find $item->description in original template then you can use it.


maleli VIP
Total posts: 87
24 Июнь 2014 23:26

I got it from the dump:

["descriptions"]=> object(stdClass)#282 (1) { ["description"]=> string(371) "Suscripción 1 año..." }

Работает на Cobalt