HTML5 Data Bindings Support Product Page

Not a problem

Data not read if the binding is on a included file

Reported 28 Nov 2013 17:21:26
3
have this problem
28 Nov 2013 17:21:26 Brad Lawryk posted:
I have a large site where content regions are displayed based on a url parameter. When a page with a data binding on it is included in another page it does not work - yet that same page viewed on its own works fine so it isn't a path issue.

Only thing I can think of is I am using Web Assist's Framework Builder to do the dynamic includes. Although I can't see how they have anything to do with each other.

Does DMX Zone have a compatible way to do dynamic includes the way Framework Builder from WA does?

Replies

Replied 28 Nov 2013 17:55:49
28 Nov 2013 17:55:49 Brad Lawryk replied:
The dataset is not read even if the page with the dataset is included using a simple PHP include either. Therefore there must be a bug somehow preventing the dataset from being read if the page is included.
Replied 28 Nov 2013 19:43:31
28 Nov 2013 19:43:31 Teodor Kuduschiev replied:
Hello,
What exact part of the code are you trying to include and how exactly are you including it?
Replied 28 Nov 2013 19:49:57
28 Nov 2013 19:49:57 Brad Lawryk replied:
Example:

I have an Index Page with all my global content such as header, footer and Nav.

I have many sub pages that contain different datasets.

If I view the page with the datasets by itself it works fine. But if I use even the basic PHP include to include the page in my content area the data is not rendered.
Replied 28 Nov 2013 20:15:44
28 Nov 2013 20:15:44 Teodor Kuduschiev replied:
Can you please provide a link to such a page where we can check what exactly are you trying to achieve?
Replied 28 Nov 2013 20:22:02
28 Nov 2013 20:22:02 Brad Lawryk replied:
I will do up a sample. It is currently just on my local machine.
Replied 20 Dec 2013 21:43:55
20 Dec 2013 21:43:55 Brad Lawryk replied:
Alright I discovered why this is happening!

The parent page already has the javascript links in the header from data that is in the parent page such as Security. When including a page that also has record sets on it - it includes the links to the javascript again causing a conflict.

Taking these two lines out of the page that is included corrected the problem.

<script type="text/javascript" src="../ScriptLibrary/dmxDataBindings.js"></script>
<script type="text/javascript" src="../ScriptLibrary/dmxDataSet.js"></script>


Would a require once command fix this or do I have to keep deleting the second set of script links?
Replied 20 Dec 2013 22:08:58
20 Dec 2013 22:08:58 Teodor Kuduschiev replied:
Including whole pages with doctype and <head>, <body>, <html> tags in pages that already have those is not a valid markup.
So you should:
1. Have all of the js/css/etc includes from head tags contained only on the MAIN page.
2. Save the Child pages(the ones you want to include) without the doctype, head, html and body tags, just the code and include it just as a code on the main pages.


Replied 20 Dec 2013 22:16:08
20 Dec 2013 22:16:08 Brad Lawryk replied:
That is exactly what I assumed, but .....

1: Every time I add a datasource any of the data bindings or anything it always adds the js links to the head and I always have to delete it.

2: If I do it that way - none of the extensions work because it doesn't have any where to put the required code.
Replied 20 Dec 2013 22:22:53
20 Dec 2013 22:22:53 Brad Lawryk replied:
And if I have all the data sources on the parent page I don't have access to them in the data bindings panel when working on the child page.
Replied 01 Jun 2014 21:50:52
01 Jun 2014 21:50:52 Hans Haverlach replied:
Did this ever got solved in some way?
I'vee exact the same extensions and problems.
Did you find a solution Brad?
Thankx for replying.
Hans

Reply to this topic