Announcement

Collapse
No announcement yet.

Reliable way of inserting <mvt:item />??

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Reliable way of inserting <mvt:item />??

    Hello to everybody.

    I am a little new in the miva world, so I hope this post has sense :).

    Basically I am writting a module which must insert some <mv:item/> tags in certain pages, my doubt is, how can I do that in a way that I can be sure the tag was correctly inserted?

    The first attemp i used was this. Lets say I want to insert something into the SFNT page, and lets say that by default SFNT contains the text "MY_TEXT", then i could use glosub() function in this way

    globsub('MY_TEXT', 'MY_TEXT', 'MY_TEXT' $ <mvt:item name="myItem" >)

    The problem with that approach is that although 'MY_TEXT' may be at the SFNT page in the default installation, if the shop owner has customized it and removed the 'MY_TEXT' chain, then no replace will be performed by the globsub() function and the <mvt:item name="myItem" /> will not be inserted.

    So, anybody knows if there is a better approach for this?.

    Thanks in advance.

    #2
    Re: Reliable way of inserting &lt;mvt:item /&gt;??

    Inserting tokens into pages is totally unreliable unless it will always be a brand new, unaltered store. Removing them when uninstalling a module is just as precarious.
    Bill Weiland - Emporium Plus http://www.emporiumplus.com/store.mvc
    Online Documentation http://www.emporiumplus.com/tk3/v3/doc.htm
    Question http://www.emporiumplus.com/mivamodu...vc?Screen=SPTS
    Facebook http://www.facebook.com/EmporiumPlus
    Twitter http://twitter.com/emporiumplus

    Comment


      #3
      Re: Reliable way of inserting &lt;mvt:item /&gt;??

      That what's I suspected... Thanks a lot for your help :)

      Comment


        #4
        Re: Reliable way of inserting &lt;mvt:item /&gt;??

        ...and the only alternative is the call the Original Template, Replace there, then Insert (and adding a note that you did that)...however, likely, as William was eluding to, piss off more store owners than writing clear instructions that explain what to do...especially if its just a few items.
        Bruce Golub
        Phosphor Media - "Your Success is our Business"

        Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
        phosphormedia.com

        Comment

        Working...
        X