Is it possible to build a single-page website with silverstripe? Is it a bad idea - in sight of silverstripe?
How would a template look like to load all articles from several categories and subcategories in silverstripe?
Thanks for any links to tutorials, code-snipets, etc.
I have built backbone.js 'apps' with SilverStripe. You load the front end resources as you would any other SS project. I prefer not to use SS template vars to include assets (js/css), as js applications require strict placement guidelines (although it is possible to load everything using the Requirements class).
Check out the RESTful server docs for examples of usign the SilverStripe CMS to control your data, and use API endpoints to access this data from the front end. In fact, there is no need to have the SS backend and the single page app front end on the same server in this scenario, which is the beauty of REST.
For link handling in single page apps, you can use PushState or listen for hash change events. Either way, the front end JS handles routing, rather than usign SS's Director class.
Please provide more details on what you are trying to do if you'd like more specific help.
Related
I want to build a image website like this
ex.com/en-us/lion-wallpapers.html
ex.com/en-gb/lion-wallpapers.html
ex.com/en-in/lion-wallpapers.html
and i want to use single image path to be go through in multiple urls
using routing
images/lion/lion.jpg
.....is google only crawls single image with urls ???
or am i need to maintain individual directories and make them to copy on each directory?? so suggest me some best practises and URL srtructure for this ...
For URL structure like this your better off using a framework that has support for routing and then building your website in a Model-View-Controller(MVC) pattern.
This is quite abstracted architectural stuff so I can't really give specific examples.
Any framework that supports routing would work but an example is Zend Framework: http://framework.zend.com/
Here's their documentation on routing: http://framework.zend.com/manual/1.12/en/zend.controller.router.html
With routing you would be able to one lion-wallpapers.html page that then depending on the URL changes the language on the page.
In terms of how google will crawl your site, it will crawl your websites using links from your first page and anything you add to a sitemap. You can help customise how it crawls your website by adding your site to Google Webmaster tools here: https://www.google.com/webmasters/tools/home?hl=en
I have a folder containing a php booking system,that i want to render as un article and add it to the main menu of the site.
The solution that i end with, is to use the joomla URL Wrapper. But it brokes my design as it render it inside an iframe.
Is there another way to do that?
Use Jumi, it includes PHP files into articles, without iframes.
Usage:
{jumi [path/to/file.php]}
Jumi website
That requires an integration work. At least you'd rather think of the way to give some Jooml Component wrapper to your booking sysytem. which at least involves creating a com_yourcomname folder, and a yourcomname.php that will dispatch your actions to the actions of the booking component and, perhaps, filter the urls in the output so that they match the Joomla url building convetions. If do this properly, your app will appear as a page content (not an article)
How can I make the website layout standalone without including it into drupal?
I can do this with wordpress: e.g index.php (my layout), /css/style.css (my styling), /wp/~ (wordpress directory)
Hope that gives an idea of what I'm trying to do.
Before you ask, I prefer external methods because I like to make a lot of experimental sites, usually CMS limit some of my concepts when the site is within the database.
Thanks.
If you just want to use Drupal as a storage/authentication engine, look at the Services module, or writing a custom module that provides handlers to take data from your standalone pages via AJAX or form submissions and process them in Drupal, then serve data back out to your standalone app.
To get data in: Post it via AJAX or a form submission that transparently redirects back to your standalone pages.
To get data out: Use direct MySQL queries, JSON requests or bootstrap Drupal so you can use the Drupal API inside your standalone pages.
Most of the time though you can do nearly anything "the Drupal way" once you understand how it does things (which is very quirky at times). Check out http://drupal.org/project/examples for demos of how certain things are implemented, and the http://drupal.org/project/clean base theme for a nice minimalist starter theme to work from.
With the subtheme, You do in some sense create your own "external" css.
You can add custom css in the info config file, and use different template tpl.php to implement the css on various the pages.
That is not all that different from write:
<link rel="stylesheet" type="text/css" href="test.css" />
Drupal just try to organize it for you.
So I've built my site in Code Igniter and there are a number of pages where I feel it'd be easiest if the client could edit the content inline - much like what MojoMotor offers.
I'm not interested in using mojomotor but I wondered if anyone had done anything like this for their code igniter project?
As an idea of how it could work:
I was thinking that the client admin user could login to the normal custom built admin CMS area. After logged in, with session set, they can browse out to the public site for selected pages.
These pages will have a check for that admin session built in and if it's present, it can include a js file, which will overlay an admin banner and somehow enable the fields (perhaps content divs with a certain id or class relating to the corresponding table/field in DB) for editing.
--EDIT--
I've seen quite a few js inline editors around. I guess my confusion is over how best to integrate them with my database and controllers - i.e. idea of having the div id/class somehow map to the db field.
The bottom line is that MojoMotor is a CodeIgniter app and not a library. Therefore trying to work the code into your existing CodeIgniter project is not really an option.
But if you're willing, you can integrate your CodeIgniter project into MojoMotor and have the benefits of both. Here is a series of articles written on how to do this.
This is one example of the code you are looking for . You'll have to adapt the method for use with CI
I want to build a site that allows user to get filtered subsets of some information I have stored on a database. The information will change frequently and I will want to create a post every now and again to say when new information or features become available, so the site has CMS aspects and web app aspects.
Coming from a desktop programming environment, I have to admit I'm not entirely certain how far a CMS like Drupal or WordPress can take me. The web app would basically be a form with several interdependent options and a Submit button. When the Submit button is clicked, I would want to call a web service that returns the information in one of a variety of formats.
So will I need to install my CMS and have an iframe or just a link to the web app which is developed completely outside of it, or can I build my web app's front end directly in the CMS (and hopefully achieve a nice, integrated look) and just have it call the service behind a button?
I half-expect that this web app would become a WordPress/Drupal plugin, or am I barking up the wrong tree?
Yes you can do this. Try out jquery, I think is already included (at leas in wordpress). "Break into" the layot part add js file of your own that makes an AJAX call to a url and returns some HTML from there and puts that content into a certain HTML component (a div that you also add there by your self with a certain id).
User clicks a button, triggers the ajax call and voila.
There are also complicated ways like developing your own plugin that makes SOAPCalls and integrated with the wordpress/drupal etc. But as you say that you are a desktop developer this is the closest aproach to you knwoledge and perspective.
AJAX LOAD WITH JQUERY