how to disable or enable newsletter popup in magento 2 porto theme - magento-2.0

Here I am using Porto theme in magento 2. I need to disable newsletter popup. There might be a setting for it.
But I don't know where is it. Please help.
Something written in xml file as below:
<referenceBlock name="customer-account-navigation-newsletter-subscriptions-link" remove="true"/>

Line written in xml is correct.
It seems you want to remove newsletter tab from my account page. So to do that I have added the same line in theme customer module file.
app/design/frontend/theme/default/Magento_Customer/layout/default.xml
Code in file
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceBlock name="customer-account-navigation-newsletter-subscriptions-link" remove="true"/>
</body>
</page>

Related

How do I change the Google Analytics tracking code generated by DotNetNuke?

AFAIK, DotNetNuke websites automatically generate your Google Analytics tracking code.
Recently Google has suggested changing the tracking code you need to use (to this) if you wish to use new features such as demographics. Any idea how to customise the GA code generated by DotNetNuke?
I've looked into the DNN database and the GA code or UA don't seen to exist there. Also checked the language editor without luck.
Editing SiteAnalytics.config in the website root (httpdocs) seems to be the correct solution.
The GA code in /Config/SiteAnalytics.config doesn't affect what is rendered in the page. As Chris mentions below, this might be what is generated for each new portal.
Please note that i am using DNN 7
WHat version are you using?
Here is all of what is in my root SiteAnalytics.config file:
<?xml version="1.0" encoding="utf-8" ?>
<AnalyticsEngineConfig>
<Engines>
<AnalyticsEngine>
<EngineType>DotNetNuke.Services.Analytics.GoogleAnalyticsEngine, DotNetNuke</EngineType>
<ElementId>Head</ElementId>
<InjectTop>False</InjectTop>
<ScriptTemplate>
<![CDATA[
<script type="text/javascript">
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', '[TRACKING_ID]');
ga('send', 'pageview');
</script>
]]>
</ScriptTemplate>
</AnalyticsEngine>
</Engines>
</AnalyticsEngineConfig>
Paste that and upload to your ftp. Make sure the site you are testing has a google tracking ID set in the google analytics setting for the site otherwise this code will not show up.
For DNN 9.x:
There are a couple guides out there but they are not fully up-to-date so below I compile more complete steps.
https://blog.bayareasearchengineacademy.org/web-analytics/how-to-install-and-configure-google-tag-manager-in-dotnetnuke-dnn/
http://www.dnnsoftware.com/community-blog/cid/155268/using-google-tag-manager-with-dnn
Both of the above insert the Google Tag Manager script and noscript codes in the body. That's not ideal. Google wants the script tag in the HEAD and the noscript tag in the BODY.
Also they guides don't describe how to update your Tracking_ID which is hidden from DNN Community 9.x installs. Here is how to do it all.
Use the instructions from Google to set up your Account and Container. https://support.google.com/tagmanager/answer/6103696?hl=en&ref_topic=3441530
Using the section "Add, update and publish tags" from the above link setup a new "Tag" and choose "Tag Type" of "Universal Analytics". Under "Google Analytics Settings" dropdown choose "New Variable" and enter the Google Analytics "Tracking ID" for the site you want to track. Give the "Tag" a "Trigger" of "All Pages".
Save everything and Name your variable and tag something like "Universal Analytics Variable" and "Universal Analytics Tag".
You should now be back at the home page of your Google Tag Manager "Workspace". Look in the top right corner and click the Workspace ID which will be something like "JTF-F9CBJA". Copy the code and note the instructions.
Go to your DNN install via FTP and find "SiteAnalytics.config" which is in the root of your website. Edit SiteAnalytics.config so that it resembles the first sample code below. Note that I have created XML to insert the "script" tag at the top of the HEAD and the "noscript" tag in the BODY.
Now go to the root of your DNN portal. The default root is at "/portals/0". If you have multiple portals you'll need to follow these instructions for each portal.
Find the file GoogleAnalytics.config. Find the node for "SettingName" with the value "TrackingId". Change the "SettingValue" below it to your Google Tag Assistant "Workspace ID" (from the code you saved above). If you don't have those nodes in your GoogleAnalytics.config then copy from my second code sample below. Save the file.
Reload the website that you updated. Check the source to see if the "script" code is inserted in the HEAD and the "noscript" code in the BODY.
If you're using Chrome install the "Tag Assistant" extension from the store and use it to verify that the code on your page is working.
Note by default DNN does not insert the GA code for administrators unless you check the box "Track for Administrators". Personally I check that box so that my Tag Manager shows the code properly. Google Analytics filters out known administrators by default so I don't feel it's safe.
Code Sample 1 - SiteAnalytics.config
<?xml version="1.0" encoding="utf-8" ?>
<AnalyticsEngineConfig>
<Engines>
<AnalyticsEngine>
<EngineType>DotNetNuke.Services.Analytics.GoogleAnalyticsEngine, DotNetNuke</EngineType>
<ElementId>Head</ElementId>
<InjectTop>True</InjectTop>
<ScriptTemplate>
<![CDATA[
<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','[TRACKING_ID]');</script>
<!-- End Google Tag Manager -->
]]>
</ScriptTemplate>
</AnalyticsEngine>
<AnalyticsEngine>
<EngineType>DotNetNuke.Services.Analytics.GoogleAnalyticsEngine, DotNetNuke</EngineType>
<ElementId>Body</ElementId>
<InjectTop>False</InjectTop>
<ScriptTemplate>
<![CDATA[
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=[TRACKING_ID]"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
]]>
</ScriptTemplate>
</AnalyticsEngine>
</Engines>
</AnalyticsEngineConfig>
Code Sample 2 - GoogleAnalytics.config
<?xml version="1.0" encoding="utf-8"?>
<AnalyticsConfig xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Settings>
<AnalyticsSetting>
<SettingName>TrackingId</SettingName>
<SettingValue>ENTER YOUR WORKSPACE ID HERE</SettingValue>
</AnalyticsSetting>
<AnalyticsSetting>
<SettingName>UrlParameter</SettingName>
<SettingValue />
</AnalyticsSetting>
</Settings>
</AnalyticsConfig>
*Finally: This all requires some serious technical work so use these instructions at your own risk.

How do I link the logo to an external site?

I would like to change the link in the Plone logo viewlet. By default it points to the Plone site root, I want to point it to a location that is not within the Plone site.
I tried writing a custom logo viewlet, but this seems very complex for such a small change. What is the best way to do this?
The easiest way to change the Logo link is to override the logo viewlet template. This is best done with z3c.jbot.
You need to add z3c.jbot to your projects custom product, by adding it as a dependency in setup.py, and also set up the configure.zcml correctly:
<include package="z3c.jbot" file="meta.zcml" />
<browser:jbot
directory="templates" />
Don't forget to make sure you have the browser prefix added in the <zcml> tag.
You can now copy the logo.pt file from plone.app.layout to the templates directory in your custom product. Rename the file to plone.app.layout.viewlets.logo.pt and change:
tal:attributes="href view/navigation_root_url;
title view/navigation_root_title"
To:
href="http://stackoverflow.com"
Restart the server, and the logo link has now changed.
Alternatively you can edit it via ZMI (/manage) in portal_view_customizations. And search for the "plone.logo" view.
It should open this url in the frame:
/portal_view_customizations/zope.interface.interface-plone.logo/pt_editForm

Joomla module positions not working

I'm using Joomla, and as far as I can tell I have done everything right for my template, but can't get Module positions to work
I have the correct XML file setup I think and this is my HTML tag:
<jdoc:include type="modules" name="topnav">
The page is X if you look at the page source it is rendering that tag - I would expect that to disappear, and to be replaced with the content I have told the Joomla backend to put there?
Very confused!
Try this-
<jdoc:include type="modules" name="topnav" />
You are missing closing tag.
let me know if this does not work.
How are they not working? Are the positions updating in admin, but not on the website? Or are they not updating in the admin page too? From what I remember of Joomla, you have to click on the 'save' icon once you've rearranged all your positions.

drupal view rss having extra spaces

I have created a feed view in drupal and i've set the Rss feed and all the settings properly but the problem is when i click on view feed it returns the page having space above the starting of the file as shown below.
<?xmlns version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="http://cloud.ilinksys.com/feed.xml" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
The above space is already in the page. Anyone have any idea to remove the extra spaces of above the rss feed actual data.?
usually there's extra space before opening php tag <?php in template.php file or any other template or modules file which are called.

Can't get fields to show in Drupal Views module

I have a view setup in the Views module that outputs an RSS feed of nodes. In the Fields section I have specified that I want the Title, Date and Body in the feed, but Views seems to ignore all but the title (and the link which I haven't specified to include). I know it's using the Views module because if I remove the title for each item or rename the entire feed it is reflected in the actual feed. I don't think there's any tpl files that are restricting the output either, but I don't know all the places to look. Does this sound familiar?
<?xml version="1.0" encoding="utf-8" ?>
<rss version="2.0" >
<channel>
<title>RSS Feed Title</title>
<description>...</description>
<link>http://...</link>
<item>
<title>Title</title>
<link>http://...</link>
</item>
<item>
<title>Title</title>
<link>http://...</link>
</item>
.
.
.
Click on the Feed display tab. Under Basic settings, click on the gear icon for th Row style. Check the Display type and set it to something other than Title only.
You may also want to check out the Views RSS module. It provides more flexibility in terms of what you're able to include in the feed. It's especially useful for including CCK fields in the feed.

Resources