Creating a list of contacts for advertiser

Discussion in 'Templates, HTML, CSS, and Design Help' started by jason1971, Dec 5, 2014.

  1. jason1971 Customer

    Hi all,

    In Administration > Manage users
    Is it possible to add a 'Yes' next to the username if the advertiser has subscribed to the newsletter option? to save going through every advertiser's personal info page.

    I have tried adding {if $entry.newsletter=="Y"}Yes{/if} in admininstration/templates/default/users/users_browse.tpl but nothing is showing up

    Any thoughts as to whether I'm missing something out (or as usual got it wrong) ?

    Many Thanks in advance

    Jason.
  2. freeze2 Super Moderator

    I just ran a quick {debug} on that template file and it doesn't appear that the newsletter data is being pulled into that page...not sure how much work it would be to accomplish what you want to do.
  3. Mike-N-Tosh Owner

    Unfortunately, the "newsletter" field is not part of the getallusers function that is passed to the users_browse.tpl file. Also the set of users returned to that template is also limited to the number of results set for pagination as well.

    However, here's a little "not really a secret" way to get them and export them to a csv file.
    1. Log in to your administration (should be at the home page, "Dashboard"). If you're not, go to the dashboard page.
    2. Click on the number link right next to: "Newsletter Subscribers"
    3. At the users list page, click on the little excel spreadsheet icon at the center bottom of the page to download your list of subscribed users.
    4. Enjoy your file of subscribed users and get yourself a beer in celebration!
    Hope this helps!

    -Mike
    "When there's a will... There's usually upset relatives."
  4. jason1971 Customer

    Cheers guys, thanks so much.

    Just out of interest freeze how do you do a debug on a template page, because I tried that by adding {debug} in <head> in layout.tpl as usual but nothing came up ? Cheers jason
  5. Mike-N-Tosh Owner

    Jason,

    Please refer to the online documentation for that. It needs to be at the very top of the file. You also need to ensure that you have any pop-up blockers turned off.
  6. jason1971 Customer

    Thanks Mike, very useful to know

Share This Page