I want to develope a joomla! 2.5 module on which the admin could select an article so that the selected article will be displayed as a link in the frontend. The params of a module are declare in the modulename.xml file, so I want to know if there is a field type like the one that lets you select an article when you create a menu item to show a single article.
here is the xml file
<fieldset name="basic" addfieldpath="/modules/mod_ctfapartados/elements/">
<field name="" type="article" default="0" label="MOD_APARTADOS_LINK_ONE_LABEL"
description="MOD_APARTADOS_LINK_ONE_DESC"
for some reasons i am not able to edit the code in my previous answer so here is the revised part of code
<fieldset
name="request"
addfieldpath="/administrator/components/com_content/models/fields">
<field
name="article_id"
type="modal_article"
label="label"
required="true"
description="desc"/>
</fieldset>
create a folder in your module with name "elements"
copy the file article.php from joomlaroot\administrator\components\com_content\elements
and place it in your modules elements folder
then in your xml add these lines
Related
I have Base theme called theme_test
Here is the template code(this template is added in manifest's data).
<template id="product_catg_test" name="Product Category">
<t t-if="categories">
<code for print category>
</t>
</template>
So I have created an extended module called test_theme_extended and tried two inherit approach to replace the t-if condition
First Approach(I added this file in data in the manifest)
<template id="product_catg_test_extended" inherit_id="theme_test.product_catg_test" name="Test">
<xpath expr="//t[#t-if='categories']" position="replace"></xpath>
</template>
This first approach gives me an error
odoo.tools.convert.ParseError: "Element '' cannot be located in parent view
Second Approach(I added this file in QWEB in the manifest)
<t t-extend="theme_test.product_catg_test">
<t t-jquery="t[t-if='categories']" t-operation="replace"/>
</t>
This also not working.
I am thinking that the main view created from the theme and it has no external ID that's why I face this issue. But how can I inherit the base theme view in extended module?
If you are inheriting a theme it has to be from another theme, or use a record instead of template.
Defining a theme, as with a theme prefix and in the thema category
Since a module-theme creates the views in theme ir_ui_view and creates copies without XMLID in ir_ui_view
and a normal module creates the views in ir_ui_view
So if from a normal module (ir_ui_view) you want to modify a view-theme (theme_ir_ui_view) then literally it will not find the element because it is in another table
but if you still want to try you can do the inheritance in this way, inheriting the copies that do not have the XML so you have to do the inheritance by the key
<record id="product_catg_test_extended" model="ir.ui.view">
<field name="name">product_catg_test_extended</field>
<field name="inherit_id" search="[('key', '=', 'theme_test.product_catg_test')]"/>
<field name="type">qweb</field>
<field name="key">test_theme_extended.product_catg_test_extended</field>
<field name="arch" type="xml">
<xpath expr="//t[#t-if='categories']" position="replace"></xpath>
</field>
</record>
currently I'm struggeling with the exact same problem. So far when debugging the code responsible for the lookup I wondered why the content of the parent view is not the same as the xml shows.
Long story short: The templates from theme modules are NOT stored as ir.ui.view but as theme.ir.ui.view. The code will lookup with the wrong ID as it expects a regular view - either finding the wrong regular view or finding nothing.
Unfortunately I did not find any solution to modify a theme.ir.ui.view - if someone has a solution I would really appreciate if she/he shares it with us.
It seems the only way to modify a theme is to edit the original xml files.
UPDATE:
I've tried to work with a different approach like I inherit form views (<record model='theme.ir.ui.view />) but this only created the record in the table theme_ir_ui_view but did not triggered the inheritance mechanisms.
For now I've created a new xml inside the theme I want to modify and have to live with that. Maybe a custom module named 'theme_XXX' could also inherit a theme template but I have to go on with my project.
I want to add a HTML input field to Advanced PDF of Netsuite. We have a requirement from client where we need to add an editable field to the Advanced PDF. If anyone has tried doing this previously please help. I want to add a textarea to the Advanced PDF.
The BFO Report Generator documentation has details on how to create PDF form fields.
http://bfo.com/products/report/docs/tags/tags/input.html
http://bfo.com/products/report/docs/userguide.pdf (page 57)
The code would look something like
<input type="text" name="address" lines="4" scrollable="no" />
However, take note that this functionality is only available in the "Extended Edition" of the Report Generator. I am not sure what version NetSuite licenses.
I have already posted one question on the same issue. But I'm not able to solve my issue and not able to move forward in my task.
I have created a editable portlet where in the configuration page I am showing he dynamic questions which are fetching form the database. So for the same reason I am iterating my array list and creating the input fields dynamically as follows,
Iterator<String> itr = al.iterator();
while(itr.hasNext())
{
String columnVal = itr.next();
columnVal = columnVal.trim().toLowerCase();
%>
<aui:input name="<%=columnVal%>" type="checkbox" />
<%
}
With the above code the fields are creating dynamically with proper labels and seems to be fine.
When I try to save these dynamic field values in the preference I changed my input statement syntax to the proper way by adding the prefix as "preferences--" and suffix as "--" as shown below,
<aui:input name="preferences--<%=columnVal%>--" type="checkbox" />
I don't know what syntax is wrong in the above statement. But I am not able to see the label names in UI. instead of showing the proper label names for all labels it is showing <%=columnVal%> on UI.
I am using default configuration action class in my liferay-portlet.xml as mentioned below,
<configuration-action-class>com.liferay.portal.kernel.portlet.DefaultConfigurationAction</configuration-action-class>
Can any one please correct my syntax and help me to save my dynamic field values in the preferences.
From reference link's comment section:
According to JSP 2.1 Specification multiple expressions and mixing of
expressions and string constants are not permitted.
So you have to use below code in your case:
<aui:input name='<%="preferences--"+columnVal+"--"%>' type="checkbox" />
I have added a new tab in my profile page of IBM Connections 4.0 by registering it in widgets-config.xml file the tab is successfully added and is working fine but the problem is i want to give some custom name to the tab like "Hello World" i tried adding title attribute to the iWidget xml file but its not working, the server is always picking the defId used in the widgets-config.xml as tab name instead of the title attribute,i also tried adding the name in widgets-config.xml file itself but the space is causing the problem. Any help in this regard is greatly appreciated.below is how the iWidget xml file looks like.
<iw:iwidget name="helloWorld" title="Hello World" xmlns:iw="http://www.ibm.com/xmlns/prod/iWidget"
iScope="HelloWorldWidgetClass" supportedModes="view">
<iw:resource uri="helloworld.js" />
<iw:content mode="view">
<![CDATA[
<div id="frameHolder" style="width:678px;height:606px;">
<iframe id="testFrame" style="width:inherit;height:inherit;border:none;"></iframe>
</div>
]]>
</iw:content>
Thanks,
Vinay
The wording used in iWidgets 2.1 spec document suggests that the use of the title attribute is not mandatory by the container:
title: This attribute suggests a title that could be used in any decoration (e.g. titlebar) around the iWidget. This item can be set in both the iWidget definition and the microformat placing an iWidget instance on a page.
I suggest opening an IBM Connections PMR to bring this issue to the attention of the development team.
In Connections, the title and descriptions for iwidget are both defined in widget-config.xml by "defId" and "description". You could add NLV support for these 2 string by add "Customizing product strings" to Connections.
Here is a brief steps to do that:
in widget-config.xml
in LotusConnections-config.xml
put your strings file in
/strings/com.xxx.myWidget.properties
/strings/com.xxx.myWidget_en.properties
...
/strings/com.xxx.myWidget_zh.properties
in each of the property file:
myWidget=My widget title
myWidget.desc=My widget description
The detailed steps could be found in Connections product document, but the idea is same, to provide customize string support for 3rd party iwidget.
I'm trying to create a Safecracker form in ExpressionEngine to create a recipe. I have a recipe channel, which can have many ingredients from an ingredients channel (using the multi-relationship add-on from devot:ee). However, I'm having trouble listing the ingredients within my form. This is my mark-up:
{exp:safecracker channel='recipes' datepicker='no' id='add-recipe-form' include_jquery='no' return='recipes/view/ENTRY_ID' safecracker_head='no'}
{related_entries id='ingredients'}
{title}
{/related_entries}
{/exp:safecracker}
The problem is, the actual EE tags are just getting output on my web page.
I figure I'm doing something fundamentally wrong, so could someone point me in the right direction? Thanks.
This is called "variable collision" - you're nesting entries which use the same variable/tag names as those used by the parent tag (in this case, {title}), and due to how EE's parse order works, the parent tag is winning every time.
The solution is to put your above code into another template, and embed that template within your Safecracker form. Embeds are run at the very end of template processing, after all of the other EE tags are parsed, so you won't run into the same collision.
Derek is right, you need to embed your related entries. I've got this working on my Toronto EE meetup site with this code.
Simplified Template code:
{exp:safecracker channel="gta-attendee"}
<div class="form_row" style="display:none;">
<label class="small">Choose Meetup to Attend:<span class="required">*</span></label>
{embed="includes/_playa_select" selected="{attendee-event:child_ids}" }
</div>
{/exp:safecracker}
embedded code:
{exp:channel:entries dynamic="no" channel="gta-meetup" limit="1"}
<input value="{entry_id}" name="attendee-event[selections][]" type="hidden">
{/exp:channel:entries}
In the code I'm using the Playa Module, but the principle is the same.
Hope this helps
Sean