Return Content by Json
I am a content editor but had to set up a website and was using a half finished template. I have one error I can’t get my head around. I will get a professional programmer in if I have to but I thought I try this first as I have no budget for this setting up this site.
My site has a third level navigation, if I click on a link in the navigation the setup on the third level only refreshes the content area and the url when using json
code is
getPagePayload: function(params) {
$('#content-stage-wrap').removeClass('ready').addClass('in-transition');
params.layout = (params.layout == undefined) ? 'ajaxload' : params.layout;
params.layout = (params.layout == undefined) ? '' : params.layout;
$.ajax({
url: ‘/new/_resources/design/content-by-json’,
dataType: ‘HTML’,
type: ‘GET’,
data: {
‘pageid’: params.assetid,
‘SQ_PAINT_LAYOUT_NAME’: params.layout
},
success: function(response) {
// if the request includes a callback, use it.. (a function to handle the ajax response)
{ (params.callback != 'undefined' && typeof params.callback == 'function') }
params.callback.call(this, response); // brings the scope to the callback
},
error: function(error) {
console.log(error);
}
My problem is it is displaying the extra page instead of hiding it. What is the best way of not having it displayed?
Where do I start looking to have this “shadow page” not displayed? Sorry if this is a stupid question but I just started to work with Squiz and I am not a programmer.