Jump to content
Sign in to follow this  
Greg Lumley

HannaCode won't work on blog posts...

Recommended Posts

Hi, this has me stumped, please help.¬†ūüė≥

I'm using a field 'page_body' in a page-template as well as a blog-template. 
HannaCodeDialogue is enabled for the field page_body.

HannaCode works perfectly in Pages but not in Posts. 

The dropdown is visible in the pages edit template but not in the posts edit template. 

If I manually put the code into the Posts Template i.e. : [[YouTubeVideo videoName="my_vid"]] it simply displays the tag. 

I'm quite sure this is a config error of some sort but for the life of me, I can't find it. 

 

Thank you. 

 

Greg. 

Share this post


Link to post
Share on other sites

Hi Greg,

I'm not too sure what you meant by page-template. In PW it's quite a bit confusing because a page and a template is a different thing.

You have to put Hanna tag in your Blog page, not in the template file.

You assigned the Hanna Code Text Formatter in your Body field.

Share this post


Link to post
Share on other sites
7 hours ago, Greg Lumley said:

Hi, this has me stumped, please help.¬†ūüė≥

I'm using a field 'page_body' in a page-template as well as a blog-template. 
HannaCodeDialogue is enabled for the field page_body.

HannaCode works perfectly in Pages but not in Posts. 

The dropdown is visible in the pages edit template but not in the posts edit template. 

If I manually put the code into the Posts Template i.e. : [[YouTubeVideo videoName="my_vid"]] it simply displays the tag. 

I'm quite sure this is a config error of some sort but for the life of me, I can't find it. 

 

Thank you. 

 

Greg. 

@monchu is correct, please describe or provide a screenshot of how you have your "page_body" field setup.

Here is an example of the basic body field being used for the Hana Code Text Formatter.

1200990714_ScreenShot2020-09-21at2_32_45PM.thumb.jpg.2989bab59d138e34a876cb375d7a949a.jpg

  • Like 2

Share this post


Link to post
Share on other sites

As it turns out, the error was mine!

I wasn't using the same field as I thought. page_body was correctly setup with the 'Hanna Code Text Formatter'

The actual field I was using is blog_body (the disadvantage of not starting from scratch while learning)

blog_body was not set up to use the 'Hanna Code Text Formatter'

Thank you all for trying to help me.¬†ūüėĀ

 

  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By cosmicsafari
      Hi all,
      Not sure if this is even possible but I would like to add a button on my modules configuration page that triggers a method to run.
      The method in question belongs to the module itself.
      Is this possible?
      So far I have:
      MyModule.module
      public function init(){ wire('forms')->addHookAfter('InputfieldSubmit:processInput', $this, 'foo'); } public function foo(){ error_log('IT WORKS!!'); return; } MyModuleConfig.php
      public function __construct() { $this->add( [ [ 'name' => 'Foo Button', 'type' => 'InputfieldSubmit', 'value' => 'Fire Foo Method', ] ] ); } This renders the button but so far haven't had any luck getting the method to fire successfully.
      I haven't found any examples from my investigations so apologies if this is an impossible request.
       
       
    • By msavard
      I have a situation where I have links to a bunch of forms on my site. Every year the links to the forms change slightly, adding the current year to the end. So it is something like http://www/somewhere.com/form1/2017. Next year it will be the same thing but with 2018 in the URL.
      I was hoping HannaCode could help me out here by letting me create a snippet that would read the year from a settings page and insert that at the end of any links I specify. So in the CKEditor I create a link, add [[cyr]] (my HannaCode snippet that pulls back the year from the settings page and I verified that it is indeed working properly) to the end and instead of pulling in the year it is just encoding the [[cyr]] into the URL. I was expecting
      http://www.somewhere.com/form1/2017  and I'm getting
      http://www.somewhere.com/form1/%5b%5bcyr%5d%5d .
      Is HannaCode not able to work with raw HTML this way? Is there some other way to do what I'm trying to accomplish? I really don't want to go around the site updating 100 links when a new year comes around.
      All the links are to forms on an external site in case that helps...
      Thanks.
    • By ragnarokkr
      Hi all guys! I've a BIG problem here and hope you can help me to solve it.
      Suddenly yesterday my PW installation stopped letting me to log in.
      I can access the front-end, but each time i try to log into the back-end it gives me "This request was aborted because it appears to be forged."
      I already have searched into the forum and tried every possible solution, without any result 
      In order:
      site/config.php is readable site/assets/{cache,logs,sessions} is present and 0755 (and setting them to 0777 doesn't make any difference) tried to backup site/assets/sessions directory and make another new empty one nothing is changed with user:group permissions setting $protectCSRF, $sessionChallenge, and $sessionFingerprint to false the error disappears but the login page still remains making the sessions table empty doesn't make any difference enabled/disabled the www. redirection in .htaccess, just in case but nothing enabled $debug and no error removed cookies restarted the server Anybody has an idea? 
    • By gebeer
      Hello and Happy New Year to everyone,
      I'm trying to implement module configuration fields in an Inputfield Module following Ryan's blog post https://processwire.com/blog/posts/new-module-configuration-options/
      Is this supposed to work for all modules?
      My module extends InputfieldCheckboxes.
      This is the structure of my module folder:

      The InputfieldCheckboxesDependenciesConfig.php is not being picked up at all.
      When I configure it the old way with ___getConfigInputfields(), it is working.
    • By spacemonkey95
      Hi all,
      I've got a Table field on one of my pages. The first column requires the use of Hanna Code so I can add custom icons to the table cell. As per the settings for that particular field, I've set the textformatter option as TextformatterHannaCode (as the screenshot will show, for this particular field it's not possible to just select text formatters from a select dropdown. Instead I have to type in the value).
      Now, if I manually type in my HannaCode label (e.g. [[icons_copy]] )  then it will output correctly onto the page, but I need to also have the HannaCode selection menu which normally shows up in CKEditor when right-clicking in the textarea field. Does anyone know how I can achieve this? Do I need to apply a different setting in the Settings area as shown in the screenshot?
√ó
√ó
  • Create New...