xLink / CybershadeCMS

[Abandoned][Broke] Repo for CybershadeCMS
1 stars 0 forks source link

Allow URL Filtering on Blocks #21

Open NoelDavies opened 11 years ago

NoelDavies commented 11 years ago

Each block should allow for URL filtering, enabling and/or disabling the block on specific routes.

Any ideas how we should do this?

MantisSTS commented 11 years ago

Why would they be included on a page where they wouldn't be allowed to be executed. Blocks should only be shown on specified pages (ie, objBlocks->getBlock('test') or whatever) so I don't see why they would need any interaction with the URL sys?

xLink commented 11 years ago

the original idea was to have the blocks installed as unique entities, then attach them to a menu set & the page calls that menu set, each block in the menu set had its own set of parameters, so you could essentially have one block & have it show a ton of different things depending on the settings

the problem now, is that the block sys, dosent do that this time around, apparently its been interfaced with the route sys to show blocks relevant to that page, so idk xD

MantisSTS commented 11 years ago

I still don't see what the issue is really.

The block (imo) should be created in whatever way, then assigned to a page/url, when that page gets called it should all get exec'd.

Hence a block, it's a block of code/content which gets added to a page.

NoelDavies commented 11 years ago

Richie, the way that works is very primitive, think of how Drupal does it, so you create a block, and you can specify an allow/disallow list for it. That's how I'm seeing this work, putting the power in the hands of the admin.

MantisSTS commented 11 years ago

Then there are many ways of doing that, one of them is to serialize an array of disallow/allowed urls and check against that, however, that seems a bit slow.

But I'm still not 100% sure what the issue is XD

NoelDavies commented 11 years ago

It's not an Issue, more of a todo.

MantisSTS commented 11 years ago

Which makes it an issue, as its not complete xD

On 22 November 2012 16:18, Daniel Noel-Davies notifications@github.comwrote:

It's not an Issue, more of a todo.

— Reply to this email directly or view it on GitHubhttps://github.com/cybershade/CSCMS/issues/21#issuecomment-10639051.

NoelDavies commented 11 years ago

eh? Basically rich, It's just something the blocks need, much like drupal has them. It's just here to remind me to do it ^.^

xLink commented 11 years ago

For this i would say a whitelist is better, add the block id, the route & the params in a table, and then it'll be output, since a block should be able to take params, so they are reusable - makes it simple enough to setup then & fairly powerful too