var pageContentManager = {

	// internal meta data.
	urlPrefix: '',
	viewFilesPatterns: {},
	clientManager: null,
	changeTemplate: function() {},

	// events.
	beforeLoad: function() {},
	afterLoad: function() {},
	afterAllSuccess: function() {},
	onFail: function() { console.log('Something wrong happend.') },

	config: function(options) {
		if (typeof options.urlPrefix == 'string') {
			this.urlPrefix = options.urlPrefix;
		}

		if (typeof options['beforeLoad'] == 'function') {
			this.beforeLoad = options.beforeLoad;
		}

		if (typeof options['afterLoad'] == 'function') {
			this.afterLoad = options.afterLoad;
		}

		if (typeof options['afterAllSuccess'] == 'function') {
			this.afterAllSuccess = options.afterAllSuccess;
		}

		if (typeof options['changeTemplate'] == 'function') {
			this.changeTemplate = options.changeTemplate;
		}

		this.clientManager = options.clientManager;
	},
	load: function(url, onSuccessCallback, config) {
		
		if (typeof onSuccessCallback == 'undefined') {
			onSuccessCallback = function(){};
		}

		that = this;
		that.beforeLoad(url);

		loadPage = {
			success: function(response) {
				var partials = config['partials'];
				var pageContentInstance = that.changeTemplate(config['template']);

				// view
				if (typeof partials != "undefined") {
					// this should not work, it should actually load file!
					for (partialName in partials) {
						Handlebars.registerPartial(partialName, partials[partialName]);
					}
				}

				var getView = function(viewName, onLoad)
				{
					// to keep it on localstorage in order to save network
					$.get("/static/view/" + viewName + ".html", function(data) {
						onLoad(data);
					});
					// catch error in case it not able to load it.
				};

				getView(config['view'], function(viewContent){
					// @todo catch errors here
					var template = Handlebars.compile(viewContent);
					pageContentInstance.html(template(response['data']));

					that.afterAllSuccess();
					onSuccessCallback(response['data']);
					that.afterLoad();

				});

				// console.log("There is a no view pattern for this page.");
				that.afterLoad();
			},
			error: function(result) {
				// console.log('ERROR');
				// console.log(result);
				that.afterLoad();
				that.onFail();
			},
		}

		if (config['loadData'] == false) {
			loadPage.success({'data' : null});
		} else {
			this.clientManager.get(that.urlPrefix + url, loadPage);
		}
	}
};
@@ -907,21 +907,16 @@
 unction(
-url, 
 onSucces
@@ -1026,24 +1026,149 @@
 n()%7B%7D;%0A%09%09%7D%0A%0A
+%09%09// if it's not a string, don't load it!%0A%09%09if (typeof config%5B'loadData'%5D != 'string') %7B%0A%09%09%09config%5B'loadData'%5D = false;%0A%09%09%7D%0A%0A
 %09%09that = thi
@@ -1188,19 +1188,16 @@
 oreLoad(
-url
 );%0A%0A%09%09lo
@@ -2512,19 +2512,34 @@
 refix + 
-url
+config%5B'loadData'%5D
 , loadPa

pageContentManger no need to pass needless information in case of loadData is false