How to create the child page to parent page in wiki - ibm-sbt

I am posting a new query regarding wiki page creation programmatically using SBT.
I tried to create the wiki page under one parent page but did not find a link to map both parent and child. Every time I create the wiki page it gets created independently without community(non-community wiki page).
I working with a playground but it is throwing some exceptions.
Thanks in advance for your response.

There is no code specifically to set a child page. You'll have to extend the wiki service in the sbt to make it work for child pages.
Per http://bastide.org/2014/05/06/creating-a-new-wiki-page-as-a-child/
API Details
URL: https://{hostname}:{port}/wikis/basic/api/wiki/{wiki-label}/feed
Method: POST
Content-Type: application/atom+xml
You may have to add the X-Update-Nonce header.
You have to update the XML with the parentUuid – eg bd586bb6-d9b2-4527-b9a0-0f9b0d3c1e3f
When you complete the post, you’ll have a new page with a parent page.
<entry xmlns="http://www.w3.org/2005/Atom">
<category term="Test" label="Test"></category>
<category term="page" label="page" scheme="tag:ibm.com,2006:td/type"></category>
<parentUuid xmlns="urn:ibm.com/td">parentUuid</parentUuid>
<title>Tes4</title>
<summary></summary>
<label xmlns="urn:ibm.com/td">Tes4</label>
<content type="text/html"><?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html [<!ENTITY amp "&#38;"><!ENTITY lt "<#60;"><!ENTITY gt ">#62;"><!ENTITY nbsp " "><!ENTITY apos "'"><!ENTITY quot """>]><div></div></content></entry>

Hi Srinivas In SBT if you are using wikiservice.js, you just need to make sure you are using correct wiki label.
Here is the sample code for adding a page to wiki named manishkataria
var wikiPage = wikiService.newWikiPage();
wikiPage.setWikiLabel("manishkataria");
wikiPage.setTitle("dummytitle");
wikiPage.setSummary("dummysummary");
wikiPage.setTags("tag2");
wikiPage.setLabel("uniquelabel1");
wikiPage.setContent("dummy content");

Related

Is there a way to setup Clicktale tag in Google Tag Manager?

Since GTM doesn't support document.write() method the standard clicktale code doesn't work. Is there a workaround for this?
ClickTale employee has sent me these instructions:
Replace the document.write JS line above with the following:
document.body.appendChild(externalScript);
Example:
<!-- ClickTale Bottom part -->
<script type='text/javascript'>
var externalScript = document.createElement('script');
var scrSrc = document.location.protocol=='https:'?
'https://clicktalecdn.sslcs.cdngc.net/':
'http://cdn.clicktale.net/';
scrSrc += 'www11/ptc/xxx-xxx-xxx-xxx.js';
externalScript.src = scrSrc;
externalScript.type = 'text/javascript';
document.body.appendChild(externalScript);
</script>
<!-- ClickTale end of Bottom part -->
I am not sure what to do with this. Has someone tried something like this?
The correct way to do it is explained in http://wiki.clicktale.com/Article/Google_Tag_Manager_Integration
The procdeure is:
Create a new container (or add the below to an existing container).
Create a new Custom HTML tag in your GTM container.
Copy and paste your project’s bottom code (from the ClickTale account) into the new
tag.
Check the “Support document.write” checkbox.
I tried it and it worked. Anyway I had to wait 24h (probably it's the time that Google needs for publishing the tag).
The above answer will work, but Google Tag Manager does have a template for ClickTale now, I always try to refrain from using the Custom HTML tag because this can absolutely break your site if done incorrectly
To set up ClickTale within GTM
New - Tag
Certified Analytics
ClickTale Standard Tracking.

Fast login form on the right side in magento

I want to add same login form in my site
is there any module available for that or we can have something else coding changes for this
please suggest me something
i want something like this :
http://livedemo00.template-help.com/magento_42632/
You could create a block of type customer/form_login. Using the XML as follows
<block type="customer/form_login" name="customer_small_login" template="customer/form/small-login.phtml" />
You can view the customer/form/login.phtml form for reference of what kind of fields your block is expecting.0
You can then add this to your sidebar using
<?php $this->getChildHtml('customer_small_login'); ?>
NOTE: Ensure your adding you XML block as a child node of the sidebar which you wish to include it in.

rearrange product blocks

I have 3 questions that my normal Googling efforts haven't answered. I'm a in-house front end web developer that has been trying to learn Magento for the past two weeks. I'm also new to posting on Stack Overflow, so let me know if these would be better posted as separate questions or something.
1. Layouts - Making it so every single page uses the same layout
So most of my pages are using my 2columns-left layout, but not all of them. I have some set in my local.xml, and some I just hard coded in the .phtml pages directly. I would have thought the following code would make ALL pages use the same layout:
<reference name="root">
<action method="setTemplate"><template>page/2columns-left.phtml</template></action>
<action method="setIsHandle">
<applied>1</applied>
</action>
</reference>
There are a lot of pages I don't normally see when I work on the site that are stuck with the default Magento layouts, like the /cookies-enabled page, or the review pages. What's the best practice for unifying all pages if you want the same layout on the entire site, rather than having a block like this in local.xml for every single page?
2. Contact Us Form - Clicking the submit button doesn't work
I am editing the contact us page under CMS>Pages, and I think I am possibly missing the file that my form action is pointing to. The form shows up, but it doesn't submit.
Here is what I have on our Contact Us CMS page:
{{block type='core/template' name='contactForm' form_action="/contacts/index/post/" template='contacts/form.phtml'}}
Here's the error I get after clicking the submit button:
Not Found
The requested URL /contacts/index/post/ was not found on this server.
I've gone through the configuration settings and I think those are right, but maybe there is something else I have to do there.
3. Product Reviews - Getting an "Overall" rating to display
I have the review div that utilizes form.phtml showing up on my product pages after you login and add a review, but the ratings aren't being shown. I am apparently not satisfying the conditions of an if statement that controls if the ratings should be displayed. Below is the if statement that it is getting caught on I believe:
<?php if( $this->getRatings() && $this->getRatings()->getSize()): ?>
I'm not sure how to satisfy these conditions.
4. Rearranging Blocks - Using local.xml to rearrange where blocks are going
Before I start developing bad habits, I want to make sure I'm using best practices from the get go. I've typically just gone into the template files and manually move where stuff was appearing in the phtml, but I've heard it's best to make those changes in the XML. One particular issue I can't seem to figure out is a seemingly simple one: How do I make the "Proceed to Checkout" button move to the bottom of the cart?
I'm trying to unset it then re-set it after the other blocks. I haven't even been able to get the unsetChild part to work. Here is my code from local.xml:
<reference name="content">
<action method="unsetChild">
<name>checkout.cart.top_methods</name>
</action>
</reference>
I think the reason this isn't working is because in checkout.xml it's the child of a child. Here's the general flow of the checkout.xml:
<checkout_cart_index>
<reference name="content">
<block name="checkout.cart">
**<block name="checkout.cart.top_methods">**
Any ideas? Thanks so much, and sorry about the length of this post!
1°) Edit all your layout xml to change the layout of the root reference to 2columns-leftf.phtml template
You can also go through an observer. Observe the controller_action_layout_generate_blocks_after event and in your method do :
public function myEventHandling($event) {
$event->getAction()->getLayout()->getBlock('root')->setTemplate('page/2columns-left.phtml');
}
2°) module Contacts controller index action postAction() so it should be /contacts/index/post/ so it should work. Except if you made your CMS page replacing /contacts/ normal behaviour (module contacts controller index action indexAction() ) it will search under your cms page instead of in the contacts module. If your CMS page have contacts as url, try changing it.
3°) Could you be more precise ? I don't really understand what you need. The form or the existing ratings are not showing up ?
4°) UnsetChild or remove instruction are global, you have to set it with a different name after a replace. But you can edit your layout file in your template directory (not the ones on the base/default/layout directory) to move the block in the proper location, and in the phtml file, try to move the
echo $this->getChildHtml('myblock')
in the proper location.

Default Article content position div in Joomla 2.5

I wish to show a Article's content on a Joomla template 2.5 page.
I have seen the use of the div ids 'wrapper' with another div 'main' inside that in the index.php page but that seems not to work.
Does normal article content require positions like modules? In the CMS I don't see anything in the Article Manager that allows me to specify a position?
Help please!
The articles are showed by default (or any other component content)where this tag is located in your template:
<jdoc:include type="component" />
Normal content does not require any position like modules.

when customer login my related and upsells not display

I have a problem with my related and upsells.
When a customer login, my related and upsells not display in product_view.
The three most likely ways in which this can happen involve the following:
Layout XML
PHP/PHTML
CSS
Layout XML: grep your layout xml for <customer_logged_in> and see if there are any <remove /> nodes referring to these blocks. Also check for <action> tags with unsetChild method calls that refer to these blocks.
PHP/PHTML: It's possible that the templates and class definitions for these blocks have had logic added to them to check for customer logged in state. This would be an inefficient way to accomplish this, but it's possible. You'll need to check the templates (google for Magento template path hints) and the block classes in which they are rendered; see if they have been customized.
CSS: This is the most unlikely candidate, but I've seen developers set display:none based on <body> classes added via layout XML. This could be seen as an addBodyClass call in the <customer_logged_in> layout update handle, which I described how to find above.

Resources