Hi,
I would like to give the @include tag a lot more use but for that the priority in processing it has to be slightly changed.
I tried to introduce a series of If Defined tag in an included file and none of them work. Would be great if the Included file's tags were processed like if they made a part of that file.
The problem is that we developed a module and have a search form + results part for a webservice integration. It so happens that this webservice has over 10 different search forms. Since a lot of the fields are the same (like date, destination, num adults) I was trying to have one file full of if defined tags to provide validation, instead of having to copy that 6 or 7 times over.
Nuno
Developer forum
E-mail notifications
@Include improvement
Posted on 11/03/2011 15:52:50
Replies
Nicolai Høeg Pedersen
Posted on 14/03/2011 12:50:01
I do not understand...
Includes are processed as the first thing when loading the template and are interpreted as if all of it is inside the original template - so you can easily have if defined inside your includes.
Includes are processed as the first thing when loading the template and are interpreted as if all of it is inside the original template - so you can easily have if defined inside your includes.
Posted on 14/03/2011 13:25:20
Hi Nicolai,
That's weird, because it's not working :S I will post it as bug
Thanks,
Nuno
That's weird, because it's not working :S I will post it as bug
Thanks,
Nuno
Nicolai Høeg Pedersen
Posted on 14/03/2011 14:24:32
I'm pretty sure there is no bug...
Could you attach a copy of the template and includes here?
Could you attach a copy of the template and includes here?
Posted on 15/03/2011 10:26:01
Hi Nicolai,
In attachment you can see the files. in the SearchHotel.html I have included the other file. I know the included tag works because when of the alert in that file.
I tried including a js file, and html file, but none seem to work
Thanks,
Nuno
In attachment you can see the files. in the SearchHotel.html I have included the other file. I know the included tag works because when of the alert in that file.
I tried including a js file, and html file, but none seem to work
Thanks,
Nuno
Nicolai Høeg Pedersen
Posted on 15/03/2011 18:20:37
That was a lot of if defineds... You might want to use JS to check if the fields are their instead of if defined.
That said, does the if defined work when used directly in SearchHotel.html?
What does the DwTemplateTags return when inserted in SearchHotel.html?
That said, does the if defined work when used directly in SearchHotel.html?
What does the DwTemplateTags return when inserted in SearchHotel.html?
Posted on 15/03/2011 18:45:06
Hi Nicolai,
Everything works fine if within the SearchHotel.html file. When you place them in another file through the @Include tag, that's when it stops working, that's why I say it's a bug (according to you).
We are using that much If Defined's to work in all search forms we have to develop (around 15) and have as little client-side processing (javascript) as possible.
Nuno
Everything works fine if within the SearchHotel.html file. When you place them in another file through the @Include tag, that's when it stops working, that's why I say it's a bug (according to you).
We are using that much If Defined's to work in all search forms we have to develop (around 15) and have as little client-side processing (javascript) as possible.
Nuno
Nicolai Høeg Pedersen
Posted on 16/03/2011 13:57:49
If we could have a link it would make it easier to locate the problem.
Could you mail me the URL?
Could you mail me the URL?
Posted on 16/03/2011 15:42:48
Hi Nicolai,
i didn't yet (nor opened a case) because it's on a local server with the developer. It will become available in a few days. I will post it then.
Nuno
i didn't yet (nor opened a case) because it's on a local server with the developer. It will become available in a few days. I will post it then.
Nuno