We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36704
    • 131 Posts
    Hi Bobray,
    It's me again... a call for help!
    I am still playing around the NewsPublisher all TV's are working on frontend, however i observed when i was try using the @INHERIT on TV doesn't work.
    But in manager when i click the TV (Printcopy) it works, it will display the contents of my chunks [[$Baptismalcert]]

    Is there anyway to accomplish this or it was on the roadmap of NewsPublisher?

    Thank you in advance!


    Please see my codes below:

    *******************************************************************************

    TV Name: Printcopy
    Input Type: Checkbox
    Input Option Values:
    PrintCopy?==[[$Baptismalcert]]

    Default Value: @INHERIT
    Output: Default



    *******************************************************************************

    MY CHUNK (Baptismalcert)
    	 <img src="/assets/upload/certificatelogo.png" width="581" height="166" />
    <p></p>
    	<h1>Certificate of Baptism</h1>
    	<h2>This Certifies that</h2>
    	<p><strong>[[*ChildsFirstName:ucwords]] [[*ChildsMiddleName:ucwords]] [[*ChildsLastName:ucwords]]</strong></p>
    	<p>child of [[*FathersName:ucwords]] and [[*MothersName:ucwords]]</p>
    	<p>Born in [[*BirthPlace:ucwords]]</p>
    	<p>on  [[*BirthDate:strtotime:date=`%B %e, %Y`]]</p>
    	<p>and residing at [[*Residence:ucwords]]</p>
    	<h2>was solemnly baptized</h2>
    	<p>on [[*BaptismalDate:strtotime:date=`%B %e, %Y`]]</p>
    	<h2>according to the Rites of the Roman Catholic Church</h2>
    	<p>by the Rev. [[*Priest:ucwords]]</p>
    	<p>the sponsors being [[*GodFathersName:ucwords]] and [[*GodMothersName:ucwords]]</p>
    	<p>This documentation appears on the Baptismal Register of this Church:</p>
    	<p>Book no. [[*BookNo]], Page no. [[*PageNo]], Line no. [[*LineNo]]<p>
    	<p>Date of Issuance: [[*DateIssue::strtotime:date=`%B %e, %Y`]]</p>
    	<p>Purpose for  [[*Purpose]]</p>
    	<p></p>
    	<p>________________________</p>
    	<p>Parish Priest</p>
    <p></p>
    <p></p>
    



    *******************************************************************************
    NewsPublisher:
    [[!NewsPublisher?
    &show=`ChildsFirstName,ChildsLastName,ChildsMiddleName,BirthDate,BaptismalDate,BirthPlace,MothersName,FathersName,Residence,GodFathersName,GodMothersName, BookNo,PageNo,LineNo,Printcopy,Priest,DateIssue,Purpose`
    
    	&captions=`Printcopy:Create Certificate`
            &initdatepicker=`1`
            &parentid=`2`
    	&hidemenu=`1`
            &published=`1`
            &template=`3`
    	&postid=`[[~[[+id]]]]`
    								&required=`ChildsFirstName,ChildsLastName,ChildsMiddleName,BirthDate,BaptismalDate,BirthPlace,MothersName,FathersName,Residence,GodFathersName,GodMothersName`
    ]]
    



    My Template:
    <!DOCTYPE html>
    <html>
    	<head>[[$Head]]</head>
    
    	<body class="mainbottom">
    		[[$Navbar]]
    	<div class="container topspace20">
    			<div id="clear"></div>
    				<div class="row">
    					<div class="span3  topspace20 offset1">
    						<a class="iconlink "href="[[~11]]"><i class="foundicon-people"></i></a>	
    					</div>
    					
    					<div class="span6 topspace20">
    						[[!SimpleSearchForm? &landing=`12` &tpl=`searchtemplateform`]]
    					</div>
    					
    				</div>
    			</div>
    
    		[[!NpEditThisButton? &debug=`1` &np_id=`2`]]
    		<div class="span11">
                               [[*content]]
    		           [[$BaptismalDetails]]
    		           [[*Printcopy]]
                        </div>
    
    
    </body>
    </html>
    

    [ed. note: alyainec last edited this post 14 years ago.]
      • 3749
      • 24,544 Posts
      If I'm understanding you, the problem is that the tag is not processed in NP. This is by design because otherwise users could enter a tag in the front end and MODX would process it when the page reloaded. That would allow them to cause all kinds of trouble.



      ------------------------------------------------------------------------------------------
      PLEASE, PLEASE specify the version of MODX you are using.
      MODX info for everyone: http://bobsguides.com/modx.html
        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
        • 36704
        • 131 Posts
        Il'' see... Thanks for that answer..
        May be i will find another alternative way to show my Chunks tpl in using NP.
          • 3749
          • 24,544 Posts
          Markus Schlegel has suggested a fix for this. I haven't had time to check it out, but you might want to try it.

          It involves adding a single line to the NewsPublisher class file:


          https://github.com/marcsch/newspublisher/commit/82118aa1f1fbd9cac2c0944704ac67bad268c670


          ------------------------------------------------------------------------------------------
          PLEASE, PLEASE specify the version of MODX you are using.
          MODX info for everyone: http://bobsguides.com/modx.html
            Did I help you? Buy me a beer
            Get my Book: MODX:The Official Guide
            MODX info for everyone: http://bobsguides.com/modx.html
            My MODX Extras
            Bob's Guides is now hosted at A2 MODX Hosting
            • 36704
            • 131 Posts
            I tried to copy this single line
             $ph = str_replace(array('[',']'), array('[',']'), $ph);

            but it still doesn't work. [ed. note: alyainec last edited this post 13 years, 11 months ago.]