Jump to:

3376 Posts in 1000 Topics by 713 members

Data Model Questions

SilverStripe Forums » Data Model Questions » Tracking the appearence of a page item inside another page

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 609 Views
  • gMentat
    Avatar
    Community Member
    2 Posts

    Tracking the appearence of a page item inside another page Link to this post

    Well this is what I want to do

    Let's say I have a HomePage and a NewsPage. On my HomePage I show two(2) random NewsPage pages (the title and a preview). I need to track how many times a NewsPage page item has appeared in my HomePage. Is this possible ??

    Thank you in advance

    George

  • baba-papa
    Avatar
    Community Member
    279 Posts

    Re: Tracking the appearence of a page item inside another page Link to this post

    Create a new property for your NewsPage ($db). There must be a controller method in your HomePage_Controller that is responsible for displaying those two NewsPages. Let that method increment the new property of NewsPage.

    609 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.