Page 1 of 1
FAQ database driven
Posted: Tue Jul 21, 2020 2:56 pm
by Otto
Hello,
The FAQ page is the 2nd most visited page that your potential customers go to after seeing your Home or Services pages.
For many people, FAQ pages are often the first page they go to after Home. The right questions and answers can be instrumental in advancing potential sales. The value FAQ pages bring to a website is well worth the effort in writing them.
Best regards,
Otto
https://winhotel.space/harbourino/htmlp ... riven.html
Re: FAQ database driven
Posted: Fri Jul 24, 2020 8:49 am
by Otto
Filter for FAQs
Re: FAQ database driven
Posted: Fri Jul 24, 2020 10:40 am
by Otto
Hello,
The screenshot shows code with placeholders that are patched.
To use HARBOURINO makes sense if you prepare TEMPLATES.
Then you can develop standard tasks very fast.
In the code section is the pure mod harbour code.
Best regards,
Otto
Code: Select all
cStatus="ready"
use ( hb_GetEnv( "PRGPATH" ) + "\data\faq.dbf" ) new
do while .not. eof()
if field->status = cStatus
AADD( aRelationship_DBF, ( "REC" + "_" + ALLTRIM( STR( recno() ) ) + "_ID" ) )
if LEN( ALLTRIM( field->ID ) ) = 0
hHash_DBF[ "REC" + "_" + ALLTRIM( STR( recno() ) ) +"_ID" ] = ALLTRIM( field->ID )
else
hHash_DBF[ "REC" + "_" + ALLTRIM( STR( recno() ) ) +"_ID" ] = ALLTRIM( CONVERTUMLAUTE ( field->ID ) )
endif
AADD( aRelationship_DBF, ( "REC" + "_" + ALLTRIM( STR( recno() ) ) + "_QUESTION" ) )
if LEN( ALLTRIM( field->QUESTION ) ) = 0
hHash_DBF[ "REC" + "_" + ALLTRIM( STR( recno() ) ) +"_QUESTION" ] = ALLTRIM( field->QUESTION )
else
hHash_DBF[ "REC" + "_" + ALLTRIM( STR( recno() ) ) +"_QUESTION" ] = ALLTRIM( CONVERTUMLAUTE ( field->QUESTION ) )
endif
AADD( aRelationship_DBF, ( "REC" + "_" + ALLTRIM( STR( recno() ) ) + "_ANSWER" ) )
if LEN( ALLTRIM( field->ANSWER ) ) = 0
hHash_DBF[ "REC" + "_" + ALLTRIM( STR( recno() ) ) +"_ANSWER" ] = ALLTRIM( field->ANSWER )
else
hHash_DBF[ "REC" + "_" + ALLTRIM( STR( recno() ) ) +"_ANSWER" ] = ALLTRIM( CONVERTUMLAUTE ( field->ANSWER ) )
endif
AADD( aRelationship_DBF, ( "REC" + "_" + ALLTRIM( STR( recno() ) ) + "_STATUS" ) )
if LEN( ALLTRIM( field->STATUS ) ) = 0
hHash_DBF[ "REC" + "_" + ALLTRIM( STR( recno() ) ) +"_STATUS" ] = ALLTRIM( field->STATUS )
else
hHash_DBF[ "REC" + "_" + ALLTRIM( STR( recno() ) ) +"_STATUS" ] = ALLTRIM( CONVERTUMLAUTE ( field->STATUS ) )
endif
AADD( aRelationship_DBF, ( "REC" + "_" + ALLTRIM( STR( recno() ) ) + "_DATE" ) )
hHash_DBF[ "REC" + "_" + ALLTRIM( STR( recno() ) ) +"_DATE" ] = dtoc( field->DATE )
AADD( aRelationship_DBF, ( "REC" + "_" + ALLTRIM( STR( recno() ) ) + "_TEXT" ) )
if LEN( ALLTRIM( field->TEXT ) ) = 0
hHash_DBF[ "REC" + "_" + ALLTRIM( STR( recno() ) ) +"_TEXT" ] = ALLTRIM( field->TEXT )
else
hHash_DBF[ "REC" + "_" + ALLTRIM( STR( recno() ) ) +"_TEXT" ] = ALLTRIM( CONVERTUMLAUTE ( field->TEXT ) )
endif
endif
select faq
skip
enddo
select faq
use
TEMPLATE PARAMS hHash_DBF