I figured out what was going on. The script was fine, the problem was that for some reason (maybe by intention) renaming the document type does not automatically update the content nodes to the new type. Once I reposted the content with the document type in question they obtained the new document type aliases and showed properly as a result of the script.
Steps to reproduce.
Create document type.
Create content of document type.
Publish content
Rename document type
access new type name in script.
Can't see what is wrong with this for tag
Anyone see why this loop would not work?
I have a document type with a Name and Alias set to NewsItem, my debug variable is 1 and if I remove the nodeTypeAlias test the debug line prints.
I am using version 4.0.
Any help would be great.
Thanks.
Try:
Try changing your if statement to make 1 a string instead of an integer (note the single quotes around the digit 1):
Nope, that does not work either.
Maybe a blank space at the end of the node type alias is causing the problem? Try 'NewsItem '.
I figured out what was going on. The script was fine, the problem was that for some reason (maybe by intention) renaming the document type does not automatically update the content nodes to the new type. Once I reposted the content with the document type in question they obtained the new document type aliases and showed properly as a result of the script.
Steps to reproduce.
Create document type.
Create content of document type.
Publish content
Rename document type
access new type name in script.
Thanks everyone for the help.
is working on a reply...