You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Within a template I defined a awLib as a directory with <set awLib="./awLib/"/>
and the I can use it as a variable inside
src="..." or href="..." in HTML and <script> directive.
These line Work!
However, it does not work when I try to use the var (in the same way) in a template or directive.
The following line DOES NOT WORK! <F3:include href="{{@awLib}}page_header.tpl" />
The only way to make it work it to use it as concatenated string.
The following line WORKS! <F3:include href="{{@awLib.'page_header.tpl'}}" />
Any explaination?
The text was updated successfully, but these errors were encountered:
The real explanation behind is, that it's way more complex for template directives to handle such a case, and it must be implemented in every directive itself, hence there's no one fits all solution. The main template directives that come with F3 only supports static string or token usage for its attributes and no mixed usage.. at least it's documented right that.. hence you have to use the string concatenation within the token to make it work.
Thanks Christian.
I have tried to use a library of shared template which I connected to the Document Root via a symbolic link.
When a template is included, F3 assumes the base folder to be UI (as defined in config.ini) .
For example: in config.ini Ihave
UI=./uiW3/
W3tpl=../awLib/W3/
Note: the W3tpl is a shared libray. So when using a shared template from the library, I have to define the path from the base UI so I step one folder back.
Thus : in my layout.tpl file I can have <F3:include href="./pg/pg_footer.tpl"/>
which assumes a path starting with UI (https://example.com/uiW3/pg/pg_footer.tpl)
or <F3:include href="'{{@W3tpl.'pg/pg_footer.tpl'}}"/>
which assumes a path starting with ../awLib/W3 (https://example.com/awLib/W3/pg/pg_footer.tpl)
Thanks again for a wonderfull framework.
Within a template I defined a awLib as a directory with
<set awLib="./awLib/"/>
and the I can use it as a variable inside
src="..." or href="..." in HTML and <script> directive.
These line Work!
However, it does not work when I try to use the var (in the same way) in a template or directive.
The following line DOES NOT WORK!
<F3:include href="{{@awLib}}page_header.tpl" />
The only way to make it work it to use it as concatenated string.
The following line WORKS!
<F3:include href="{{@awLib.'page_header.tpl'}}" />
Any explaination?
The text was updated successfully, but these errors were encountered: