Announcement

Collapse
No announcement yet.

File content not displaying

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    File content not displaying

    I am using a variable which is 'file content' in the <div class="social-badges"> of the Smart header area.

    If I use the variable pulling the file content nothing displays, yet the file is visible on the server and can be viewed in a browser.
    If I use:
    Code:
    <actinic:block php="true">
    if ( file_exists('bragg.txt') )
    {
    echo file_get_contents('bragg.txt');
    }
    </actinic:block>
    the content of the file is visible.

    File include variables are working correctly in the content area/innerlayout, it is just seems to be the header where the variable does not work.

    Has anyone any ideas?

    Thanks

    Jonathan
    Jonathan Chappell
    Website Designer
    SellerDeck Website Designer
    Actinic to SellerDeck upgrades
    Graphicz Limited - www.graphicz.co.uk

    #2
    A File Contents type Variable works for me in the Small Social Media Badges layout.

    There are a lot of BlockIf's involves so make sure they're not inhibiting it.
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    Comment


      #3
      Thanks Norman, can't link as it is a client site on test, however, the content of the txt file is:

      Code:
      <actinic:block if="%3cactinic%3avariable%20name%3d%22IsNotPreviewMode%22%20%2f%3e">	
      <a href="https://ww2.feefo.com/reviews/companyname" target="_blank"> <img alt="Feefo logo" border="0" src="https://api.feefo.com/api/logo?merchantidentifier=companyname" title="See what our customers say about us"/></a>
      <!--- DO NOT EDIT - GlobalSign SSL Site Seal Code - DO NOT EDIT ---><table width=125 border=1 cellspacing=0 cellpadding=0 title="CLICK TO VERIFY: This site uses a GlobalSign SSL Certificate to secure your personal information." ><tr><td><span id="ss_img_wrapper_gmogs_image_125-50_en_dblue"><a href="https://www.globalsign.com/" target=_blank title="GlobalSign Site Seal" rel="nofollow"><img alt="SSL" border=0 id="ss_img" src="//seal.globalsign.com/SiteSeal/images/gs_noscript_125-50_en.gif"></a></span><script type="text/javascript" src="//seal.globalsign.com/SiteSeal/gmogs_image_125-50_en_dblue.js"></script></td></tr></table><!--- DO NOT EDIT - GlobalSign SSL Site Seal Code - DO NOT EDIT --->
      </actinic:block><img src="15years-60px.png" alt="Fifteen Years In Business">
      and this is the code:

      Code:
      <div class="social-badges">
      	<actinic:block if="%3cactinic%3avariable%20name%3d%22TwitterHandle%22%20%2f%3e%20%21%3d%20%22%22">
      		<a href="https://twitter.com/<actinic:variable name="TwitterHandle" />" target="new_window"><img src="twitter-32.png"/></a>
      	</actinic:block>
      	<actinic:block if="%3cactinic%3avariable%20name%3d%22FacebookPageName%22%20%2f%3e%20%21%3d%20%22%22">
      		<a href="https://www.facebook.com/<actinic:variable name="FacebookPageName" />" target="new_window"><img src="facebook-32.png"/></a>
      	</actinic:block>
      	<actinic:block if="%3cactinic%3avariable%20name%3d%22GooglePlusPageID%22%20%2f%3e%20%21%3d%20%22%22">
      		<a href="https://plus.google.com/<actinic:variable name="GooglePlusPageID" />" target="new_window"><img src="google_plus-32.png"/></a>
      	</actinic:block>
      	<actinic:block if="%3cactinic%3avariable%20name%3d%22PinterestUserURL%22%20%2f%3e%20%21%3d%20%22%22">
      		<a href="http://pinterest.com/<actinic:variable name="PinterestUserURL" />" target="new_window"><img src="pinterest-32.png"/></a>
      	</actinic:block>
      	<actinic:block if="%3cactinic%3avariable%20name%3d%22YouTubeID%22%20%2f%3e%20%21%3d%20%22%22">
      		<a href=" https://www.youtube.com/user/<actinic:variable name="YouTubeID" />" target="new_window"><img src="youtube-32.png"/></a>
      	</actinic:block>
      <div class="bragg"><actinic:block if="%3cactinic%3avariable%20name%3d%22BragContentIsImage%22%20%2f%3e%20%3d%3d%20false"><actinic:variable name="BragContentText" /></actinic:block><actinic:block if="%3cactinic%3avariable%20name%3d%22BragContentIsImage%22%20%2f%3e%20%3d%3d%20true"><a href="<actinic:variable name="BragContentImageLink" />"><img src="<actinic:variable name="BragContentImage" />" alt=""/></a></actinic:block><br class="clearfloat" /></div>
      	</div>
      Not realy sure if that is helpful or not...
      Jonathan Chappell
      Website Designer
      SellerDeck Website Designer
      Actinic to SellerDeck upgrades
      Graphicz Limited - www.graphicz.co.uk

      Comment


        #4
        That code is way too site specific for anyone else to test.

        Try simplifying the code to just a diagnostic message.
        Norman - www.drillpine.biz
        Edinburgh, U K / Bitez, Turkey

        Comment


          #5
          I'd be wary of using a text file containing a blockif inside a file that gets loaded from within a blockif.

          I'd have thought that the blockif inside the text file wouldn't do anything as the blockifs have already been parsed.
          -----------------------------------------

          First Tackle - Fly Fishing and Game Angling

          -----------------------------------------

          Comment


            #6
            Thank you both, excellent thoughts.
            Jonathan Chappell
            Website Designer
            SellerDeck Website Designer
            Actinic to SellerDeck upgrades
            Graphicz Limited - www.graphicz.co.uk

            Comment

            Working...
            X