I am working (and learning) on creating a variable footer that will be based on the user that is active. I’m right now using static switches via a TV until I figure out how to extend the db with my new data. The footer comes from a file, each account organized into separate folders. so..
I use this TV’s default value to define the folder @FILE accounts/[[*acctDir]]/footer.html This is in my template.
the acctDir TV’s default is:
[[!If?
&subject= [[*account_id]]
&operator=`==`
&operand= `1`
&then= `redding`
&else= `bethel`
]]
On the page that is rendered I get this error "Could not retrieve document ’accounts/bethel /footer.html’."
--> Note the space after the insertion of the TV value..
If I just hard code it and remove the space it works fine..
It seems that the TV replacement is adding the extra space. Now what to do?
Regards...
Rick
Should I just create a snippet to remove that space?
Regards...
Rick
I stripped the spaces from the before I use it in my template
@FILE accounts/[[*acctDir:stripString=``]]/header.html
But the file html still is not found. I get this error Could not retrieve document ’accounts/redding/header.html’.
Yet if cut and paste the exact folder/file [ accounts/redding/header.html ] and replace the actual default statement [ @FILE accounts/redding/header.html ]in the TV it works...
Regards...
Rick