0
Welcome Guest! Login
0 items Join Now

SOLVED Atoms using

  • SOLVED Atoms using

    Posted 8 years 5 months ago
    • I would like to put the following <script type="application/ld+json"> listed below in every Joomla Article using Custom CSS/JS Atom Setting at BASE OUTLINE. The issue: "Please note that inline JavaScript code should be stripped out of <script></script> tags as Atom is automatically adding them."

      I assume script tag automatically added is <script type="text/javascript">, but that is not what I want to use. Any suggestions?


      <script type="application/ld+json">
      {
      "@context": " schema.org ",
      "@type": "LocalBusiness",
      "address": {
      "@type": "PostalAddress",
      "addressLocality": "city",
      "addressRegion": "State",
      "streetAddress": "123 Street"
      },
      {
      "description": "description of business goes here"
      }
      </script>
    • Sapphire Falls Web Design
      sapphire-falls.com
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 101084
    • Thanks: 13481
    • Web Designer/Developer

    Re: SOLVED Atoms using

    Posted 8 years 5 months ago
    • You could just put that in a customhtml module (including scripts tags) and publish that to a position somewhere on the page. If you need that to go in the head tag then there are extensions that you can use to add this in dynamically e.g. http://extensions.joomla.org/extension/headtag .

      Regards, Mark.
    • Please search forums before posting. Please make sure your post includes the version of the CMS you are using and a link to the problem. Annotations on screenshots can also be helpful to explain problems/goals. Please use the "secure" tab for confidential information.
  • Re: SOLVED Atoms using

    Posted 8 years 5 months ago
    • Mr. T,

      Thanks for quick response. I have actually have used RicheyWeb AdminExile in past and also looked at HeadTag script. This script is compatible with Joomla V2.5 I sure hope he someday releases scripts for Joomla V3.4+

      Thank you,
      John
    • Sapphire Falls Web Design
      sapphire-falls.com
  • Re: SOLVED Atoms using

    Posted 8 years 5 months ago
    • Actually, I think the compatibility issue is that I am using PHP v5.6.13 HeadTag may function well in Joomla v3.4 with PHP v5.5.29
    • Sapphire Falls Web Design
      sapphire-falls.com
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 101084
    • Thanks: 13481
    • Web Designer/Developer

    Re: SOLVED Atoms using

    Posted 8 years 5 months ago
    • Errr ok? Have you got this resolved then?

      Regards, Mark.
    • Please search forums before posting. Please make sure your post includes the version of the CMS you are using and a link to the problem. Annotations on screenshots can also be helpful to explain problems/goals. Please use the "secure" tab for confidential information.
  • Re: SOLVED Atoms using

    Posted 8 years 5 months ago
    • Yes, resolved. Just wish I could create an Atom to do this task.

      Quick question: Would it be better for search engine optimization (SEO) to put script in Article or a Module on page? Perhaps location of script does not matter?
    • Sapphire Falls Web Design
      sapphire-falls.com
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 101084
    • Thanks: 13481
    • Web Designer/Developer

    Re: SOLVED Atoms using

    Posted 8 years 5 months ago
    • You'll be able to do this in Gantry 5 very soon as we will shortly be introducing the "global page settings" tab (alongside - styles, settings, and layout) - this will enable you to add scripts into the head tag easily.

      Where you put that script won't make any difference to SEO. Personally i'd put it in a module as it make it very obvious to yourself where you added the script. if you bury it in an article somewhere you will innevitiably forget which on you put it in and your wouldn't want that same article on every page anyway? Putting it in a module give you much more flexibility.

      Regards, Mark.
    • Please search forums before posting. Please make sure your post includes the version of the CMS you are using and a link to the problem. Annotations on screenshots can also be helpful to explain problems/goals. Please use the "secure" tab for confidential information.
  • Re: SOLVED Atoms using

    Posted 7 years 11 months ago
    • Hi Mark, sorry to come in late to this... I also need to add microdata and have toyed with adding it to a com_content>article> "Override" but that limits me.

      I keep seeing things such as yours suggesting putting my desired microdata additions in a module position for greater control and also it would give me the ability to customize and allow for seperate modules needed for different types of article pages: allowed itemtypes (Article, NewsArticle, ScholarlyArticle, TechArtichle)... etc.

      One of my biggest problems has been that <div itemscope="itemscope" itemtype=" schema.org/Article "> is already being declared by Jooma in any article?

      How to work with that.. do I just leave the "Itemtype" out of my code?

      Can you please give me some easy to follow steps to get this code to be seen and show up:

      <div itemscope="itemscope" itemtype=" schema.org/Article ">
      <meta itemscope="itemscope" itemprop="mainEntityOfPage" itemtype=" schema.org/WebPage " itemid=" stevehallcreative.com/dallas-web-design/sdcheck ">
      <h2 itemprop="headline">Structured Data Test</h2>
      <h3 itemprop="author" itemscope="itemscope" itemtype=" schema.org/Person ">By <span itemprop="name">Steve Hall</span></h3>
      <span itemprop="description">Using microdata within an article</span>
      <div itemprop="image" itemscope="itemscope" itemtype=" schema.org/ImageObject "><img src="images/75/steve-hall.png" />
      <meta itemprop="url" content=" stevehallcreative.com/images/75/steve-hall.png ">
      <meta itemprop="width" content="75"></meta>
      <meta itemprop="height" content="75"></meta>
      </meta>
      </div>
      <div itemprop="publisher" itemscope="itemscope" itemtype=" schema.org/Organization ">
      <div itemprop="logo" itemscope="itemscope" itemtype=" schema.org/ImageObject "><img src="images/75/steve_hall_creative_avatar.png" />
      <meta itemprop="url" content=" stevehallcreative.com/images/75/steve_hall_creative_avatar.png ">
      <meta itemprop="width" content="75"></meta>
      <meta itemprop="height" content="75"></meta>
      </meta>
      </div>
      <meta itemprop="name" content="Steve Hall Creative"></meta>
      </div>
      <meta itemprop="datePublished" content="2016-03-20T08:00:00+06:00"></meta>
      <meta itemprop="dateModified" content="2016-03-25T09:20:00+06:00"></meta>
      </meta>
      </div>

      thanks
      Phil
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 101084
    • Thanks: 13481
    • Web Designer/Developer

    Re: SOLVED Atoms using

    Posted 7 years 11 months ago
    • Steve Hall - Please don't post in six month old solved topics - it's much better to raise you own topic so we don't miss your post altogether.

      All microdata is controlled by Joomla (not Gantry 5 and not the template). You can create overrides to change the default Joomla behaviour (there are no overrides provided in Gantry 5 templates deliberately). So, The best advice I can give you is to look at Joomla documentation for creating overrides and to ask your question in joomla.org forums.

      Regards, Mark.
    • Please search forums before posting. Please make sure your post includes the version of the CMS you are using and a link to the problem. Annotations on screenshots can also be helpful to explain problems/goals. Please use the "secure" tab for confidential information.

Time to create page: 0.045 seconds