Announcement

Collapse
No announcement yet.

ReadyTheme API style functions?

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

    ReadyTheme API style functions?

    I am not finding any API functions for this at the template level. I need to be able to find out if a Readytheme content item exists and then if true, find out if there is any content. Do these exist somehow/somewhere? Or, is there a way to run the component item without rendering so I could parse the return value?

    Scott
    Need to offer Shipping Insurance?
    Interactive Design Solutions https://www.myids.net
    MivaMerchant Business Partner | Certified MivaMerchant Web Developer
    Competitive Rates, Custom Modules and Integrations, Store Integration
    AutoBaskets|Advanced Waitlist Integration|Ask about Shipping Insurance Integration
    My T-shirt Collection is mostly MivaCon T-shirts!!

    #2
    Hi Scott,

    Are you referring to the Template Language Functions at the bottom of this page? https://docs.miva.com/template-langu...-documentation
    Matt Zimmermann

    Miva Web Developer
    Alchemy Web Development
    https://www.alchemywebdev.com
    Site Development - Maintenance - Consultation

    Miva Certified Developer
    Miva Professional Developer

    https://www.dev4web.net | Twitter

    Comment


      #3
      Thanks, Matt.

      Need to offer Shipping Insurance?
      Interactive Design Solutions https://www.myids.net
      MivaMerchant Business Partner | Certified MivaMerchant Web Developer
      Competitive Rates, Custom Modules and Integrations, Store Integration
      AutoBaskets|Advanced Waitlist Integration|Ask about Shipping Insurance Integration
      My T-shirt Collection is mostly MivaCon T-shirts!!

      Comment


        #4
        Matt, I think there should probably be more documentation on this:

        Code:
        <mvt:item name="readytheme" param="Load_ContentSection(g.colContent2, g.ids:col2 )" />
        <br>**<br>&mvte:global:ids:col2;<br>**<br>
        Based on very little info, I expected g.ids:col2 to the content I was looking for. Instead, I am seeing a comma-delimited list. I'm assuming I need to deserialize this value? Are the structure members listed anywhere?

        Scott
        Need to offer Shipping Insurance?
        Interactive Design Solutions https://www.myids.net
        MivaMerchant Business Partner | Certified MivaMerchant Web Developer
        Competitive Rates, Custom Modules and Integrations, Store Integration
        AutoBaskets|Advanced Waitlist Integration|Ask about Shipping Insurance Integration
        My T-shirt Collection is mostly MivaCon T-shirts!!

        Comment


          #5
          Hi Scott,

          Unfortunately, all the information I have at this time is what is in that documentation.
          Matt Zimmermann

          Miva Web Developer
          Alchemy Web Development
          https://www.alchemywebdev.com
          Site Development - Maintenance - Consultation

          Miva Certified Developer
          Miva Professional Developer

          https://www.dev4web.net | Twitter

          Comment


            #6
            Well, the Load Image function is documented just above the function list. But, not the other functions.

            I'll need to dig into the data tables, assuming the column names will be the member names. I could easily find out myself if the RT module were in the LSK.


            Scott
            Need to offer Shipping Insurance?
            Interactive Design Solutions https://www.myids.net
            MivaMerchant Business Partner | Certified MivaMerchant Web Developer
            Competitive Rates, Custom Modules and Integrations, Store Integration
            AutoBaskets|Advanced Waitlist Integration|Ask about Shipping Insurance Integration
            My T-shirt Collection is mostly MivaCon T-shirts!!

            Comment


              #7
              This works:

              Code:
               &mvte:global:ids:col2:name;
              Here are the members of that structure.

              Code:
                `id`
                `active`
                `code`
                `name`
                `descrip`
                `templ_id`
                `css_id`
                `css_class`
              What is missing, unless there is a reliable/valid way to check, is a way to capture any content in the readytheme template, which represented by: g.ids:col2:templ_id; ...
              IOW, this function doesn't load the template content. The only info I can glean is that the RT content item exists or not.

              This is my suggestion:

              Code:
               <mvt:item name="readytheme" param="Load_ContentSection(g.colContent2, g.ids:col2, g.ids:templatecontent )" />
              The parameter would be, templatecontent VAR so the passed variable could grab the template content and available to the page.

              Then, that variable could be checked for length of the string -- I'd have what I needed for this scenario.

              Scott
              Need to offer Shipping Insurance?
              Interactive Design Solutions https://www.myids.net
              MivaMerchant Business Partner | Certified MivaMerchant Web Developer
              Competitive Rates, Custom Modules and Integrations, Store Integration
              AutoBaskets|Advanced Waitlist Integration|Ask about Shipping Insurance Integration
              My T-shirt Collection is mostly MivaCon T-shirts!!

              Comment


                #8
                Hi Scott,

                I was introduced to this today so I thought I would pass it on to you. It will load the content section and output the contents without the wrapping DIV..
                Code:
                <mvt:item name="readytheme" param="Load_ContentSection(g.colContent2)" />
                <mvt:if expr="l.settings:readytheme:loaded:active">
                    <mvt:do name="l.return" file="g.Module_Feature_TUI_DB" value="ManagedTemplate_Load_ID( l.settings:readytheme:loaded:templ_id, l.loaded_template )" />
                    <mvt:do name="l.null" file="g.Store_Template_Path $ l.loaded_template:filename" value="Template_Render( l.null, l.all_settings )" />
                </mvt:if>
                Matt Zimmermann

                Miva Web Developer
                Alchemy Web Development
                https://www.alchemywebdev.com
                Site Development - Maintenance - Consultation

                Miva Certified Developer
                Miva Professional Developer

                https://www.dev4web.net | Twitter

                Comment


                  #9
                  Thanks Matt.

                  I had thought about going this route. This might defeat the purpose of what I'm trying to accomplish. That is, moving template page type renders to RT Content sections. I've done some benchmarking and the RTs increases the page speed. This is the main reason I was looking for a variation as I described prior. I think a database/table function call would load that data faster than a Template_Render -- which EVals to the web page doesn't it. I can't seem to find that function in the docs.miva or in the LSK. (I've used...before too).

                  Scott
                  Need to offer Shipping Insurance?
                  Interactive Design Solutions https://www.myids.net
                  MivaMerchant Business Partner | Certified MivaMerchant Web Developer
                  Competitive Rates, Custom Modules and Integrations, Store Integration
                  AutoBaskets|Advanced Waitlist Integration|Ask about Shipping Insurance Integration
                  My T-shirt Collection is mostly MivaCon T-shirts!!

                  Comment

                  Working...
                  X