railsyard / railsyardcms

Railsyard - One Ruby on Rails CMS to rule them all!
www.railsyardcms.org
Other
95 stars 7 forks source link

The snippets should get a unique id #2

Closed spieker closed 13 years ago

spieker commented 13 years ago

The snippets on the page should get a unique id, so there can be more than one instance of a snippet on the page.

spleenteo commented 13 years ago

Hi Spieker! thanks for your help, the remove snippet button was a next step in the "urgent to do list", so it's defenetly welcome! @silviorelli will check and merge it and he'll be able to reply to your question better than me.. I'm quite sure that every snippet has an unique id. It is assigned when you drag it onto an area via js... doesn't it works for you?

this application is gorwing up quickly in these days, any help is really appreciated!

Let us know! Matteo

Il giorno 18/ago/2011, alle ore 20.27, spieker ha scritto:

The snippets on the page should get a unique id, so there can be more than one instance of a snippet on the page.

Reply to this email directly or view it on GitHub: https://github.com/cantierecreativo/railsyardcms/issues/2

Matteo Papadopoulos spleenteo@gmail.com twitter @spleenteo

"Solo gli imbecilli non hanno dubbi." "Ne sei sicuro?" "Non ho alcun dubbio!"

spieker commented 13 years ago

The snippets are not getting a unique id while redering i think, i.e. the twitter plugin has hard coded ids "twitter_stream" and "twitter_results":

<div id="twitter_stream">
     <p id="stream_term">Search jQuery</p>
     <div id="twitter_results"></div>
</div>

I have started to fix this by adding the unique snippet id to the ids, so it looks like this:

<div id="twitter_stream-2">
     <p id="stream_term">Search jQuery</p>
     <div id="twitter_results-2"></div>
</div>

Currently I am working with Liferay in the office, which has some great features, but is really ugly at the other site. For my private needs I am looking for a cms that is much easier but offers some features I know from Liferay, such as "Portlets" (your Snippets). But how I said before, some thinks are great in Liferay and I would like to integrate them in your CMS. So I hope it is ok for you, that I do such thinks.

Greetings, Paul

silviorelli commented 13 years ago

Hi Spieker, Thanks for your previous commit, you're our first supporter :) When you drag a snippet from the right side inside one available area the snippet gets an unique id via a timestamp and it's immediately saved. I'm closing this issue.

spieker commented 13 years ago

but how can i access this unique id from the template of the snippet, to fix the problem described before?

silviorelli commented 13 years ago

Sorry I thought you meant the snippets on the backend.

Yes you are right, on the frontend it's useful to have unique ids and you are right using snippets id. Go on!

This CMS is a complete rewrite of Railsyard (v1) and we just opensourced the v2 so it's a bit incomplete. It's actively developed, all the backend will be translated.

It's ok for us if you wish to help and we really appreciate!