Comments (7)
Yeap you can have as many as you like. The usage is the same, please see the readme file :)
from silverstripe-rateable.
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.
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.
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.
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.
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.
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)
- Multiple instances of the same rating on the same page HOT 1
- Can keep on rating an item after each page refresh HOT 4
- when adding rateable to SiteTree i see it on all pages HOT 3
- I18N HOT 1
- Rating UI show on the Security/login page if applied to the Page class.
- Usage of minified .js components? HOT 2
- Update to SS4 HOT 3
- Default CSS styles should work out the box with the simple theme HOT 1
- use git tags for releases HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from silverstripe-rateable.