I installed django-cms and configured it according to the documentation.
The site comes up, but when I try to add a page I get an error:
TemplateDoesNotExist: INHERIT
I don't specify INHERIT as a template anywhere. It's finding my template directory ok, but I have no template named INHERIT and I don't know where that request is coming from.
Any help is greatly appreciated.
Can you check your TEMPLATES settings.
Looking through the source code:
By default template for a page set here:
TEMPLATE_DEFAULT = ... get_cms_setting('TEMPLATES')[0][0]
Source:
https://github.com/divio/django-cms/blob/develop/cms/models/pagemodel.py#L41
https://github.com/divio/django-cms/blob/develop/cms/models/pagemodel.py#L77
And looking through source code in utils/conf.py. A template named 'INHERIT' is added to list of available templates. And it looks like you own templates are not registered correctly and therefore the 'INHERIT' template is first item in the list.
https://github.com/divio/django-cms/blob/develop/cms/utils/conf.py#L99
https://github.com/divio/django-cms/blob/develop/cms/utils/conf.py#L136
I had failed to set the CMS_TEMPLATES as directed in the tutorial. (Actually, I had - but gremlins removed it).
Related
I'm developing a Vue app using UI Kit which implies using various custom attributes like uk-grid, uk-icon, uk-navbar etc (in Vue single file components' templates). For each one, IntelliJ gives me a warning like
Warning:(7, 52) Attribute uk-icon is not allowed here
How can I tell IntelliJ not to do this? Googling the warning haven't brought any sane results which makes me think there's no ready-to-use package for this (for this particular UI Kit), so the question is: how to make Idea not to warn about a custom list of attributes? But I'll be glad to be wrong and if there is a better solution, please let me know.
Update: like lena has suggested, pressing alt+enter suggests helpful options, including adding attribute to the list of custom attributes. However, wildcard suggestion didn't work for me: the below screenshot illustrates settings that make v-localize attrbute be recognized, but uk--prefixed attribute are still highlighted with warning:
You can add uk-* attributes to Custom HTML tag attributes list in HTML | Unknown HTML tag attribute inspection; the easiest way to do this is using Add to custom HTML attributes quickfix available on Alt+Enter:
Note that IDEA recognizes Vuikit components and directives out of the box - did you consider using it instead of pure UIKit?
I have come to a road block in my search to the answer to using custom fields in templates.
I have tried adding
%%SNIPPET_ProductCustomFields%%
in the ProductDescription.html but nothing shows.
Is there ANY documentation about this?
Can this snippet be used in certain places only? if so which ones?
What needs to be in place for this to display in the products description?
Any help, tips or pointers would be great.
The CustomFields Snippet, %%SNIPPET_ProductCustomFields%%, can only be used if being referenced through its own Panel.
By default, the Panel that calls this snippet is named %%Panel.ProductOtherDetails%%
You can also create your own custom Panels by uploading them to the Panels folder via WebDav.
For example, if you created a template file called CustomFieldsPanel.html, you would upload it to the /dav/template/Panels folder, and reference it in your theme by %%Panel.CustomFieldsPanel%%
To answer your question though, you can do one of the following to display Custom Fields in the Product Description:
Insert it into ProductDescription.html via its default Panel - %%Panel.ProductOtherDetails%% - modifying it by editing the template file ProductOtherDetails.html
Create your own custom panel, include the Snippet within that same custom panel, and insert it into ProductDescription.html by the custom panel's name. An example of that file might look like so:
<!--
* /dav/template/Panels/MyCustomFieldsPanel.html
* %%Panel.MyCustomFieldsPanel%%
-->
<div id="MyCustomFieldsPanel">
<h1> Custom Fields Below </h1>
%%SNIPPET_ProductCustomFields%%
</div>
Hope this helps :-)
I have hard-coded the link destination URL in the below link.
I need to re-factor the code so that the URL is set dynamically (reading it from a property file) Any one has an idea how to achieve that in wicket?
Thank you.
You can use org.apache.wicket.markup.html.link.ExternalLink in your Java code. Its model can read/load it from anywhere you need.
This is possible without the need for any Java code.
Given a properties file with a key for the url and the links label:
url = http://www.stackoverflow.com
label = Help me!
One can simple use Wicket message system:
<a wicket:message="href:url"><wicket:message key="label" /></a>
Tested with Wicket 6.19.0
In the Wicket guide: Reading bundles with tag <wicket:message>
Is any way to use Velocity DisplayTool in ODT template (rendered with XdocReport). I linked libraries with maven but when i render report from template I see tag $display.stripTags(Object), it seems that velocity does not recognize this tag.
Is there a need to make special configuration in xml, I use spring but I don't want velocity view resolver bean as it is in many solutions.
Ideas?
The $display variable will only be available within your template if you have added it to the velocity context.
There are 2 ways I know you can do this:
You can add an instance of the display tool to the context as a variable before rendering the template
You can create an xml configuration file and configure a ToolManager (example)
Hi I have tried every ways and means to load dojo page into ContentPane.
It seems That I am not able to do that. Correct me if I am wrong.
Looks like the only solution is through the creation and destroy of any widget while running
Clement
The dojo docs for dojox/layout/ContentPane (which allows references to script files) mentions your issue:
NOTE that dojo.require in script in the fetched file isn't recommended Many widgets need to be required at page load to work properly
#see http://dojotoolkit.org/api/1.8/dojox/layout/ContentPane
It looks like you just need to require these files in the parent widget.