Foren
Correct Url to use with $theme.include
Jim Reynolds, geändert vor 12 Jahren.
Correct Url to use with $theme.include
New Member Beitrag: 1 Beitrittsdatum: 15.03.11 Neueste Beiträge
I am developing a custom theme and I am trying to use either the #include directive from velocity or the $theme.include method to include some code into the portal_normal.vm. I have placed the code I am trying to include in the _diffs/templates folder of the custom theme, but I cannot figure out what url to pass to the #include directive or to the $theme.include method.
Can someone enlighten me?
Here is the location of the code inside the custom theme source:
docroot/_diff/templates
portal_normal.vm
docbar-script.html
Here is the code I have tried:
#if ($is_signed_in)
#include("./dockbar-script.html")
#end
#if ($is_signed_in)
$theme.include("./dockbar-script.html")
#end
Can someone enlighten me?
Here is the location of the code inside the custom theme source:
docroot/_diff/templates
portal_normal.vm
docbar-script.html
Here is the code I have tried:
#if ($is_signed_in)
#include("./dockbar-script.html")
#end
#if ($is_signed_in)
$theme.include("./dockbar-script.html")
#end
Niko H, geändert vor 12 Jahren.
RE: Correct Url to use with $theme.include
New Member Beiträge: 16 Beitrittsdatum: 21.02.12 Neueste Beiträge
I found the answer for this here: http://www.liferay.com/community/forums/-/message_boards/message/11582364
eg. #parse("$full_templates_path/velocity_file.vm")
Cheers
oops, you where including html.. but you have various velocity paths set in init.vm, hope that helps. At least in the _unstyled theme there is init.vm under templates.
eg. #parse("$full_templates_path/velocity_file.vm")
Cheers
oops, you where including html.. but you have various velocity paths set in init.vm, hope that helps. At least in the _unstyled theme there is init.vm under templates.