GithubHelp home page GithubHelp logo

Comments (7)

sheadawson avatar sheadawson commented on July 23, 2024

Yeap you can have as many as you like. The usage is the same, please see the readme file :)

from silverstripe-rateable.

SUTHERLANDesign avatar SUTHERLANDesign commented on July 23, 2024

Ok thanks, it there a code that need to be changed a bit to get as many as i like?? is something like this?

$pages = Page::get();
$sortedPages = singleton('RateableService')->sortByRating($pages);

I'm not expert on PHP, but know a bit, it would be great if i get some help on that? :D

from silverstripe-rateable.

sheadawson avatar sheadawson commented on July 23, 2024

That code will allow you to sort your list of pages by rating. Assuming you are looping over a set of pages or objects in your template, you code should look something like

<% loop Pages %>
    <h3>$Title</h3>
    Rating: $RateableUI 
<% end_loop %>

from silverstripe-rateable.

SUTHERLANDesign avatar SUTHERLANDesign commented on July 23, 2024

Ah i see, so that is not what looking for.

What i'm looking for is for example in my table on the page, there's a column called Rating, so i have at least 20 rows there, so what i want is to add the '$RateableUI' (20 of them) into the table on the rating column for all each rows. That's what i did, i just add that in the CMS content block, but it doesn't work. Does it have to be in the template instead?? Because if you add that in the template the rating will only show after the content whereas i rather to have the rating in the table within the content. Does that make sense??

from silverstripe-rateable.

sheadawson avatar sheadawson commented on July 23, 2024

Yes that makes sense. Unfortunately that's not how this rating module
works. Each Rating needs to be attached to a DataObject. If you were to use
it, you would need to set up a DataObject to represent each row in your
table and render it through a SilverStripe template. If you are not a
developer with PHP/MVC know-how then this might be a bit tricky...

On Thu, Aug 14, 2014 at 9:47 AM, buffy999 [email protected] wrote:

Ah i see, so that is not what looking for.

What i'm looking for is for example in my table on the page, there's a
column called Rating, so i have at least 20 rows there, so what i want is
to add the '$RateableUI' (20 of them) into the table on the rating column
for all each rows. That's what i did, i just add that in the CMS content
block, but it doesn't work. Does it have to be in the template instead??
Because if you add that in the template the rating will only show after the
content whereas i rather to have the rating in the table within the
content. Does that make sense??


Reply to this email directly or view it on GitHub
#4 (comment)
.

Shea Dawson
Web Developer
LiveSource

mobile +61 451125303
skype squatchnz
email [email protected]
*web *www.livesource.co.nz

from silverstripe-rateable.

SUTHERLANDesign avatar SUTHERLANDesign commented on July 23, 2024

Hmm damn! thought that would be the case, unfortunately i'm not a developer, just front-end web designer. I will have to discuss with my client about that, and look for other options.

Thanks for your time and your help on this. :)

from silverstripe-rateable.

sheadawson avatar sheadawson commented on July 23, 2024

No problem, good luck!

On Thu, Aug 14, 2014 at 10:01 AM, buffy999 [email protected] wrote:

Hmm damn! thought that would be the case, unfortunately i'm not a
developer, just front-end web designer. I will have to discuss with my
client about that, and look for other options.

Thanks for your time and your help on this. :)


Reply to this email directly or view it on GitHub
#4 (comment)
.

Shea Dawson
Web Developer
LiveSource

mobile +61 451125303
skype squatchnz
email [email protected]
*web *www.livesource.co.nz

from silverstripe-rateable.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.