Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • radmanmm 117 posts 108 karma points
    Mar 27, 2009 @ 23:22
    radmanmm
    0

    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.

  • Finn 86 posts 50 karma points
    Mar 28, 2009 @ 08:54
    Finn
    0

    Try:

  • David Conlisk 432 posts 1008 karma points
    Mar 28, 2009 @ 10:41
    David Conlisk
    0

    Try changing your if statement to make 1 a string instead of an integer (note the single quotes around the digit 1):

  • radmanmm 117 posts 108 karma points
    Apr 01, 2009 @ 15:47
    radmanmm
    0

    Nope, that does not work either.

  • Daniel Lindstrom 454 posts 271 karma points
    Apr 01, 2009 @ 15:55
    Daniel Lindstrom
    0

    Maybe a blank space at the end of the node type alias is causing the problem? Try 'NewsItem '.

  • radmanmm 117 posts 108 karma points
    Apr 08, 2009 @ 04:37
    radmanmm
    0

    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.

Please Sign in or register to post replies

Write your reply to:

Draft