Uploaded image for project: 'YesCart'
  1. YesCart
  2. YC-249

Allow use of placeholders in content body

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.1.0, 2.2.0
    • Fix Version/s: 2.1.0, 2.2.0
    • Component/s: sf server, sf web
    • Labels:
      None

      Description

      Need to integrate som macros that will allow injecting links and variables into text.

      We can adopt ##(\d*)## placeholder mechanism to allow arbitrary parameters to ContentService.getContentBody(id, params).

      So that params[0] corresponds to ##0##, params[1] to ##1## etc.

      Content service should also expose replacement mechanism to allow manual use on arbitrary strings

      ContentService.injectParameters(content, params);

      Potentially we need to adapt macros to do the following as well:
      Url links: ##contentURL('uri')##, ##categoryURL('uri')## and ##productURL('uri')##
      And inclusion of simple templates like: ##include('contentId')##

      We also may want to look into providing runtime context into templates to make it more dynamic. Through this context we may pass objects like category, product, user and so on.

      Some info on how to render component into a string in wicket: https://cwiki.apache.org/confluence/display/WICKET/Rendering+Panel+to+a+String

      We possibly need to think about re-doing the whole storefront as "Spring MVC+jsp", with html5 and latest jquery web frameworks seem pointless at this point.

        Attachments

          Activity

            People

            • Assignee:
              denis.lozenko Denis Lozenko (Inactive)
              Reporter:
              denis Denis Pavlov
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: