TYPO3 Flexform: Enable show/hide for array elements? - templates

I have created a custom content element in TYPO3 6.2 LTS using FlexForms. The backend user can add tiles with an image, text etc. In the form this is realized in an array. TYPO3 already provided automatically two items for "delete" and "sort/move" for each element (I wish I could add an image but my SO reputation is too low). Is there an easy way to also add the little lamp for "show/hide" in this case?
My Flexform looks like this (abbreviated):
<type>array</type>
<el>
<title>
<TCEforms>
<label>Headline</label>
<config>
<type>input</type>
<size>10</size>
</config>
</TCEforms>
</title>
<description>
<TCEforms>
<label>Description</label>
<config>
<type>input</type>
<size>30</size>
</config>
</TCEforms>
</description>
...
</el>

for me, it is no possible.
Your can see here this feature request and the reject from the typo3 team : feature request
As recommended, add a hide check box in your slide element

Related

Magento - left.ptml not showing on all product list pages

left.phtml the file that displays the left navigation on a magento page is only showing on one list view page and not the others does anyone have a solution to get that file to show in all list views
If you are tasking left.phtml,
Then According magento structure left.phtml are only show for Non-Anchor category in it left side of category.
And layer navigation are only showing for Anchor category.for anchor left.phtml is not showing.
For non-Anchor categories
see catalog.xml code
<catalog_category_default translate="label">
<label>Catalog Category (Non-Anchor)</label>
<reference name="left">
<block type="catalog/navigation" name="catalog.leftnav" after="currency" template="catalog/navigation/left.phtml"/>
</reference>
Also for
Anchor categories
see at catalog.xml
<catalog_category_layered translate="label">
<label>Catalog Category (Anchor)</label>
<reference name="left">
<block type="catalog/layer_view" name="catalog.leftnav" after="currency" template="catalog/layer/view.phtml"/>
</reference>
Hope ,you will understand.
Check the layout in folder theme/package (it can be in default/default, when your theme is in another folder)
Check if layout is plugged (use in your layout.xml something like <remove name="header">). If header will be removed - you use correct layout
Check the handle and reference name, where you are adding block. For example: you are adding layered navigation block. On one page it placed in handle <catalog_category_layered>, but your page there no this handle. Try to add to <catalog_category_default> or even in <default>.
Open your template and check if the block was added there. Look for
<?php $this->getChildHtml('blockName'); ?>
Try to change your block name (maybe on this page already exist block with the same name)
(this option can be useless for you) Please check the block output in system / configuration / advanced
Maybe there is a conflict between two navigation modules (for example module A and module B). The module A can use it for rewrite. But the module B will use it only for investigation and use on this page it's own calls. In that case the module A will not work (to resolve this issue you need to change rewrite. class A should rewrite class B)
If you are trying to add navigation to CMS page - try to google this topic (how to add navigation to CMS page). There are many examples and I don't want to duplicate them.

Use UpdateListItems webbservice on Sharepoint using Infopath form without managed code

I need to create a Infopath form that users can use to create posts and update a Sharepoint list.
I have located the list GUID and the Lists.asmx webbservice. I have made sure that I am admin with full rights on the List in question. The list is a basic 2 column (1 line of text).
I have created the CAML template:
<?xml version="1.0" encoding="UTF-8"?>
<Batch OnError="Continue">
<Method ID="1" Cmd="New">
<Field Name="Field1"></Field>
<Field Name="Field2"></Field>
</Method>
</Batch>
Two data connections using the CAML:
XML-file - loading the CAML.
Send data using Lists.asmx-service - "UpdateListItems"-method.
The parameters for the UpdateListItems : tns:listName connected to a variable containing the GUID. tns:updates connected to /Batch in loaded CAML, XML-subtree included.
I have added a Repeating Table using the XMLfile-connection (CAML) where I can fill the column values for the new Listitem.
I have added a button that triggers action rules that use the dataconnection and "UpdateListItems"-method. The button also is tested trigger other rule actions, so the button itself works.
As I try post a new item to the sharepoint-list I receive no error message, everything seems to work fine, but no items is created.
If I change anything, like the GUID or other things, I recieve different error messages, so it appears as Infopath thinks everything works fine, but Sharepoint isn't doing anything with my list. No items is created.
Anyone has any idea of what could it be that goes wrong?
Edit: I have used other webservices from the same Sharepoint-server without any problems.
This suggestion may be a bit dated, but...
I just had a similar problem. By using ULSViewer on the SharePoint server and reading the MSDN documentation I figured out that the Name attribute in the CAML Field tag should be the internal name Sharepoint assigns to your list column when you create it. In my case I had to change the CAML from:
<Field Name="pub1">
to
<Field Name="_x0066_ub1">
I had the same problem - you have to point the Web service submit to site /_vti_bin/lists.asmx not to server /_vti_bin/lists.asmx. For example your site is on address server/site, you should use server/site/_vti_bin/lists.asmx, not server/_vti_bin/lists.asmx. My problem was with some subsites, so you could check it if it's the same to you.
When creating new items using UpdateListItem, you need to include a Field tag for the list's ID column. It should be formatted as such:
<Field Name='ID'>New</Field>
Is Title still a required column in your list (it is by default). If so, try adding that to your XML:
<Field Name='Title'></Field>
and I dont think that
<Field Name='ID'></Field>
is required when doing a NEW command (inserting a new list item), but it is required for an UPDATE command (updating an existing list item) - I certainly didnt need it when I tested this.

How do I prevent sitecore from adding a ~ to an image path?

I have a clean install of Sitecore 6.5, DMS 2.0, and the E-Commerce Module and Sample Site (v1.2). When I have the sample site installed, most of the images appear to be broken. The HTML that is rendered includes img src attributes that contain a path that start with /~/. Example:
http://~/media/Images/Ecommerce/Examples/Products/Digital%20SLR/D200.ashx?w=250&as=1
Now, I'm assuming this is either because the sample site hasn't been updated in a while to stay current with Sitecore changes, or there is a configuration for media paths that get returned from it. Here's an example of the XSLT rendering used to write the image:
<img id="product_shot" class="fix" alt="{sc:fld('alt',.)}" title="{sc:fld('alt',.)}" src="/{sc:GetMediaUrl(.)}?w={$ImageWidth}&as=1" />
Does anyone know of a way to prevent the image url from being rendered with a ~ when using XSLT? Did I do something wrong with my initial setup and configuration?
John West gives a great breakdown here: http://www.sitecore.net/Community/Technical-Blogs/John-West-Sitecore-Blog/Posts/2012/12/Sitecore-Idiosyncrasies-Media-URLs.aspx
The important info being a configuration of "Media.MediaLinkPrefix". You can create a patch file, or modify your Web.config to change it to something else. The places I've read have people changing it to a single dash "-/media"
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
<sitecore>
<settings>
<setting name="Media.RequestExtension">
<patch:attribute name="value"></patch:attribute>
</setting>
<setting name="Media.MediaLinkPrefix">
<patch:attribute name="value">-/media</patch:attribute>
</setting>
</settings>
<customHandlers>
<handler trigger="-/media/" handler="sitecore_media.ashx"/>
</customHandlers>
</sitecore>
</configuration>
Another solution which I can think of is to change your web.config like this:
InvalidItemNameChars: Add “~“
But this will work not only for images but for any content items out there in your Sitecore content tree.
This is more of a workaround than a solution. Since I'm setting this up for demo purposes, it'll do just fine.
In web.config, I changed the value of Media.MediaLinkPrefix to include the hostname and media prefix. Since the Sitecore E-Commerce Example Site XSLT renderings start all calls to sc:GetMediaUrl(.) with a / character and sc:GetMediaUrl(.) itself returns its first character as a /, this causes the src attribute value to be written with the full host name and then correctly resolves:
<img src="//sitecore.local/~/media/Images/Ecommerce/Examples/Products/Digital%20SLR/D200.jpg />
Far from ideal, but for these purposes, this workaround did the trick.

Magento - Inject custom module on product info page

I've searched on web for how to add "block" with my template on the product page. I build my custom module that displays some sort of information and I would like to show that, let's say under the long description of my product.
I've been trying to format the xml layout of my module but without luck.
After some search I've found this: Programatically create Magento blocks and inject them into layout which I can not make it work for me. But it is probably because I've missed something.
My module is structured like this:
CODE: app/code/local/deveti/Countrypurchase
DESIGN: app/design/frontend/default/default/template/Countrypurchase/index.phtml
LAYOUT: app/design/frontend/default/default/layout/countrypurchase.xml
I know the correct way is to edit main layout file, manually add a block, but I'd like to do that on the fly.
EDIT: this works!
So I would do in my module layout xml countrypurchase.xml something like this:
<?xml version="1.0"?>
<layout version="1.0">
<catalog_product_view>
<reference name="product.info">
<block type="core/template" name="product.countrypurchase" as="countrypurchase" template="countrypurchase/index.phtml" />
</reference>
</catalog_product_view>
</layout>
And I've added a call to catalog/product/view.phtml:
<?php echo $this->getChildHtml('countrypurchase'); ?>
And it works ;)
Thank you for your help!
The problem with the product view page is that it's output is mainly controlled by the PHP code in the template catalog/product/view.phtml. Magento doesn't offer much extensibility points out of the box. You could add it to the content block but that would put your custom content either completely at the top or completely at the bottom.
I think you are required to modify the template and add PHP code to render your custom block at the position you want, like:
<?php
echo $this->getChildHtml('product.countrypurchase');
?>
With this in place you can either add your block with the name product.countrypurchase via the XML layout or programmatically.

Magento - catalog.xml not using correct template

Noob developing a Magento theme and I can't seem to figure out why Magento is not using the path I specify in the setTemplate action on catalog.xml.
I've got my own theme in /app/design/frontend/default/mycustomtheme and I've been patching files over from the base and making changes.
I've copied over /app/design/frontend/base/default/layout/catalog.xml to my custom theme at /app/design/frontend/default/mycustomtheme/layout/catalog.xml. I've set the template to be a specific phtml file...
<catalog_product_view translate="label">
<label>Catalog Product View (Any)</label>
<!-- Mage_Catalog -->
<reference name="root">
<action method="setTemplate"><template>page/2column.phtml</template></action>
</reference>
Yet it's not working. Can someone spot what the problem might be? I've got all cache disabled and other changes I make I can see immediately, just not this one.
edit: I should note, if I change something else in the catalog_product_view xml node I see those changes are reflected. For instance if I remove <action method="addJs"><script>varien/product.js</script></action> then I see the reference is removed in the rendered html file.
edit2: Adding images to address questions ...
did you setup-up / configured the theme from your store backend?
Yes, and it's actually loading the correct header and footer, and it's properly styled.
Are you sure you have such template under /app/design/frontend/default/mycustomtheme/template/page/ directory?
Yes, I can confirm the file is there
OMG. The (one and only) product I was testing on had a specific layout set under the "Design" section. So I guess that was overriding anything I had set in catalog.xml
I'd like to have the 3 hours of my life back.