ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Generating Shortcodes

July 30, 2012 5:24pm

Subscribe [2]
  • #1 / Jul 30, 2012 5:24pm

    Abbas Jaffar Ali

    29 posts

    Is there a way in EE to generate a short code and stick it into an entry?

    What I am doing is creating a channel for products specs- say spec1, spec2, spec3 and spec 4. I am also setting a relationship/playa field for this channel to the product channel. Now I would like to generate a table that compares product1, product2 and product3 using spec1, spec2 and, say, spec4. Then lets say I want to compare product1 and product3 and generate a table with spec2, spec3 and spec4.

    Is there anything that can help me generate a short code for each of the two comparisons and then insert that shortcode in an entry of the articles channel in the body where I want the table to show up?

  • #2 / Jul 31, 2012 8:29am

    Boyink!

    5011 posts

    Not quite following your build approach - but I did a product comparison tool and documented the approach here:

    http://www.train-ee.com/courseware/free-tutorials/comments/product-comparison-tool

  • #3 / Jul 31, 2012 8:48am

    Abbas Jaffar Ali

    29 posts

    Thanks for your reply.

    Basically you have Step1 of what I want. What I would like to do next is the table that is generated, needs to be plugged into an entry inside the articles channel. To give an example, I might write an entry about comparing three phones and in the middle of that document, pull up the table comparing few of the specs.

    Then maybe write another paragraph or two, and pull a table with different set of specs

  • #4 / Jul 31, 2012 8:51am

    Boyink!

    5011 posts

    Hmm..

    Rather than generating a static table, I think I’d look into using a Matrix/Playa combination in the Articles channel such that the comparison table is dynamically generated from within the Article.

  • #5 / Jul 31, 2012 1:35pm

    Abbas Jaffar Ali

    29 posts

    The issue is that different tables appear multiple times within one article so do you suggest multiple instances of the matrix/playa combo?

  • #6 / Jul 31, 2012 1:36pm

    Boyink!

    5011 posts

    Sure, if that’s what works.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases