I made a custom component and I'm trying to make the menu item link add &id=x, however I can't seem to find any documentation on how to make this work. The field is read only, but even then I would still want it to be automated (similar to how adding an article works). It will be taking a value from a parameter field. Any help is appreciated!
Found the answer in this thread towards the bottom.
http://forum.joomla.org/viewtopic.php?p=2250321
It's also important to note that the params to be added to the link need to be out of the params, like so.
<state>
<name>Standard Page Layout</name>
<url>
<param name="id" type="text" default="0" label="Page ID" description="The ID of the page to view." />
</url>
<params>
</params>
</state>
The following is incorrect.
<state>
<name>Standard Page Layout</name>
<params>
<url>
<param name="id" type="text" default="0" label="Page ID" description="The ID of the page to view." />
</url>
</params>
</state>
Related
I am attempting to move a tab on the product page in Magento 2. Currently the "custom CMS tab" is showing up before the "details" and the "reviews". I am trying to put that tab behind the reviews so that it shows up as the third tab.
I have tried removing the code completely, but it leaves an empty tab there with no content.
<block class="Magento\Theme\Block\Html\Title" name="page.main.sub.title" template="Magento_Theme::html/title.phtml"/>
<update handle="page.main.title" />
<move element="product.info.overview" destination="product.info.main" after="product.info.review"/>
<move element="page.main.sub.title" destination="breadcumbs-inner" before="-"/>
<move element="product-cms" destination="product.info.main" after="product.info.extrahint"/>
<referenceBlock name="product.info.details">
<block class="Magento\Catalog\Block\Product\View" name="cmsinfo.tab" as="cmsinfo" template="product/view/cms_tab.phtml" group="detailed_info">
<arguments>
<argument translate="true" name="title" xsi:type="string">Shipping</argument>
</arguments>
</block>
</referenceBlock>
</body>
I ran into this problem a few months ago and found a solution by #juhanix which worked perfectly for me. By passing a priority argument, we're able to use the argument to position the tabs where we need them to go.
The link to the original question and answer is below:
https://magento.stackexchange.com/questions/110796/magento2-change-order-of-tabs-on-product-page
I'm getting the following error when trying to change a custom work item's state through Visual Studio:
The field 'Assigned To' contains the value 'Seth Denburg <Project\SDenburg>' that is not in the list of supported values.
During the state transition the value from another field is copied to the System.AssignedTo field. This error stopping me from resolving a related work item during my check in through Visual Studio.
I've noticed the following alternatives allow me to successfully change the state which could help point to what the issue is:
Changing the work item's state in the web interface. No errors are displayed here.
Reentering the user's name in the field being copied from before the transition in Visual Studio.
Reentering the user's name in the System.AssignedTo field after the transition in Visual Studio.
Here is a subset of states, transitions, and fields from the custom work item type definition that I think are related to this issue:
<FIELD name="Assigned To" refname="System.AssignedTo" type="String" syncnamechanges="true" reportable="dimension">
<ALLOWEXISTINGVALUE />
<VALIDUSER group="Project\Users" />
</FIELD>
<FIELD name="Lead" refname="Project.Tfs.Lead" type="String" reportable="dimension">
<ALLOWEXISTINGVALUE />
<DEFAULT from="value" value="Seth Denburg" />
<REQUIRED />
<VALIDUSER group="Project\TechnicalLeads" />
</FIELD>
<STATE value="Pending">
<FIELDS>
<FIELD refname="System.AssignedTo">
<VALIDUSER />
</FIELD>
</FIELDS>
</STATE>
<TRANSITION from="Active" to="Pending">
<REASONS>
<DEFAULTREASON value="Completed" />
</REASONS>
<FIELDS>
<FIELD refname="System.AssignedTo">
<COPY from="field" field="Project.Tfs.Lead" />
</FIELD>
<ACTIONS>
<ACTION value="Microsoft.VSTS.Actions.Checkin" />
</ACTIONS>
</TRANSITION>
The issue ended up being that the field Project.Tfs.Lead didn't have syncnamechanges="true". Here is what the field looked like after the change was made:
<FIELD name="Lead" refname="Project.Tfs.Lead" type="String" syncnamechanges="true" reportable="dimension">
<ALLOWEXISTINGVALUE />
<DEFAULT from="value" value="Seth Denburg" />
<REQUIRED />
<VALIDUSER group="Project\TechnicalLeads" />
</FIELD>
When making the change ensure that you use witadmin changefield like the following command because the field needs to be updated across work item type definitions. Importing an xml change won't work and will give you warning TF248017.
witadmin changefield /collection:https://project.com/tfs/projectCollection/ /n:Project.Tfs.Lead /syncnamechanges:true
Here's why this change was necessary from MSDN:
You must manually enable synchronization of any custom work item
fields that you have created in previous releases of Visual Studio
Team Foundation Server and that are used to assign person names that
reference Active Directory. You must enable synchronization for each
field for each team project collection that contains the custom
fields.
https://msdn.microsoft.com/en-us/library/dd286562(v=vs.100).aspx
Have created a test in myside, works well. The code of the custom work item type definition above seems missing a </FIELDS> of TRANSITION part.
Make sure the user Seth Denburg is in both group Project\TechnicalLeads and Project\Users.
You could also create a new team project in TFS2015 and use this custom work item type definition to see if the issue still exists. If not, the issue should related to the upgrade from TFS 2012 to 2015. Make sure you have Configure features after an upgrade.
i Want to know that how to remove virtue mart components from back end for non super users in joomla.. thanks in advance
Joomla ACLs allows this.
Go to virtuemart component options -> there should be a permissions/security tab, remove access from administrators there.
**If it's not there, just add this to the modules' config and it should be enough to show it and make it work:
<fieldset
name="permissions"
label="JCONFIG_PERMISSIONS_LABEL"
description="JCONFIG_PERMISSIONS_DESC"
>
<field
name="rules"
type="rules"
label="JCONFIG_PERMISSIONS_LABEL"
filter="rules"
validate="rules"
component="com_virtuemart"
section="component">
<action
name="core.admin"
title="JAction_Admin"
description="JACTION_ADMIN_COMPONENT_DESC" />
<action
name="core.manage"
title="JAction_Manage"
description="JACTION_MANAGE_COMPONENT_DESC" />
</field>
</fieldset>
My simple module using 3 field, 2 text input and a tinymce textarea, but the textarea looks broken. http://img151.imageshack.us/img151/8648/joomla464.jpg
This is my config:
<config>
<fields name="params">
<fieldset name="basic">
<field name="moduleclass_sfx" type="text" default="" label="Module Class Suffix" description="PARAMMODULECLASSSUFFIX" />
<field name="url" type="text" default="" label="Paste the url" description="" />
<field style="clear:both;float:left;background-color:red;" name="description" type="editor" default="default" rows="20" cols="40" />
</fieldset>
</fields>
</config>
ty
You could add your css to
administrator/templates/bluestork/css/template.css (That is if your using the default administration template)
but there is a risk when joomla updates you will lose your css... you could alwasy copiy the template... give it a diffrent name and update the css there. so your copie wont be affected by any joomla update.
so adding your css there you just need to use the right css selector.
Otherwise i would use an artical selector or category selector
<field
name="category_id"
type="category"
description="JGLOBAL_FIELD_CATEGORIES_CHOOSE_CATEGORY_DESC"
extension="com_content"
label="JGLOBAL_FIELD_CATEGORIES_CHOOSE_CATEGORY_LABEL"
show_root="true"
required="true" />
And put what ever content you need in an artical.. you dont have much room to put the editor on the right for the modules configurations anyway.
I just followed the joomla tutorials on how to create the "perfect" MVC joomla component. However, my problem is that I don't know yet how to assign it to a menu. I thought that my component would then just show up when I select a "menu item type", but my component is not on this list. I've made some research on Google, but I cannot find the answer... Do I have to create a metadata.xml file or something similar ?
Thanks in advance for your answers !!
To create "views" for your component, you have to create some xml files.
Inside the templates folder in the frontend part of your component (usually something like /components/com_yourcomponent/views/someview/tmpl), if you had a template named default.php and form.php, you can create a default.xml file and a form.xml file to make these menu items available from the administrator.
You can take a look at other components to see the structure of these xml files, but what you should put inside is:
1) A name and a description for four view
2) The params the user will be able to change from the administrator (it works like module/plugin params)
3) You can also set "hidden" request variables for that menu item. It means that those vars will be added to the request in that particular menu item, but the user won't be able to change its value.
Here's a complete example for a component (Joomla 1.7):
<?xml version="1.0" encoding="utf-8"?>
<metadata>
<layout title="COM_AGMTAGS_TAG_VIEW_DEFAULT_TITLE">
<message>COM_AGMTAGS_TAG_VIEW_DEFAULT_DESC</message>
</layout>
<fields name="request" addfieldpath="/administrator/components/com_agmtags/models/fields">
<fieldset name="request">
<field name="tag_id" type="agmtag"
label="COM_AGMTAGS_TAG_FIELD_NAME_LABEL"
description="COM_AGMTAGS_TAG_FIELD_NAME_DESC"
/>
</fieldset>
</fields>
<fields name="params">
<fieldset name="basic" label="COM_AGMTAGS_TAG_OPTIONS">
<field name="layout_type" type="hidden" default="blog" />
<field name="show_tag_name" type="list"
label="COM_AGMTAGS_SHOW_TAG_NAME"
description="COM_AGMTAGS_SHOW_TAG_NAME_DESC"
>
<option value="">JGLOBAL_USE_GLOBAL</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field name="show_tag_description" type="list"
description="COM_AGMTAGS_SHOW_TAG_DESCRIPTION_DESC"
label="COM_AGMTAGS_SHOW_TAG_DESCRIPTION_LABEL"
>
<option value="">JGLOBAL_USE_GLOBAL</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field name="items_per_page" type="text" default="" />
<field name="container_class" type="text" default="agmtags-list" />
</fieldset>
</fields>
</metadata>
I hope it helped!
If you simply want to add the view link to the list create a xml file called default.xml inside the com_yourcomponent/views/yourviewname/tmpl/
The xml code below takes two language strings used to display your menu item link in the list
<?xml version="1.0" encoding="utf-8"?>
<metadata>
<layout title="COM_YOURCOMPONENT_FRONPAGE_TITLE">
<message>COM_YOURCOMPONENT_FRONPAGE_MSG</message>
</layout>
</metadata>
save the file and the link should appear in the list of menu items
Apparently, you also need the administration menu tags in your installation XML file.
http://forum.joomla.org/viewtopic.php?p=706714
This worked for me
<administration>
<menu>COM_COMPONET</menu>
<submenu>
etc...
</submenu>
Think this is what Panayiotis was trying to say
Additionally there is also another catch.
In the installation XML file of the component,
in the section, the tags must
be present, even if you do not need the menu.
If these are missing, then you'll never be given
the option to add this component to a menu item,
because the type wont be there :-)
In additional, your alternative view file names MUST NOT be written with underscores.
table_catalog.xml
table_catalog.php
table_catalog_item.php
didn't work - there wasn't new option in "menu item type" list. But
tablecatalog.xml
tablecatalog.php
tablecatalog_item.php
file names work perfectly. I've lost an hour revealing a problem.