@nakedcreativity/cee-ms-node 0.3.37 → 0.3.38

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +9 -10
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -531,8 +531,6 @@ ceems.prototype.render = function(req, res, page=null) {
531
531
  })
532
532
  }
533
533
 
534
- console.log('pagination, ', page.pagination)
535
-
536
534
  var renderedRegions = {}
537
535
  var renderedColumns = {}
538
536
  var renderedModules = {}
@@ -543,13 +541,11 @@ ceems.prototype.render = function(req, res, page=null) {
543
541
  _.each(page.regions, function(region, key){
544
542
 
545
543
  renderedRegions[key] = []
546
- console.log(key)
547
544
 
548
545
  if(region.containers){
549
546
 
550
547
  region.containers.forEach((container, index)=>{
551
548
 
552
- console.log(container)
553
549
  if(container.module){
554
550
 
555
551
  var html = `{% ${container.module} %}`
@@ -561,22 +557,27 @@ ceems.prototype.render = function(req, res, page=null) {
561
557
  container.class = 'container'
562
558
  }
563
559
 
560
+ console.log(container)
561
+
564
562
  var html = ''
565
563
  if(container.wrapper){
566
- html += `<div class="${container.wrapper}">`
564
+ html += `<div class="${container.wrapper}" data-container-id="${container._id}"><div class="${container.class}">`
565
+ }else {
566
+ html += `<div class="${container.class}" data-container-id="${container._id}">`
567
567
  }
568
568
 
569
- html += `<div class="${container.class}">`
570
569
 
571
570
  container.rows.forEach(row=>{
572
571
 
573
- html += `<div class="row ${row.class}">`
572
+ html += `<div class="row ${row.class}" data-row-id="${row._id}">`
574
573
  row.columns.forEach(column=>{
575
574
 
575
+ console.log(column)
576
+
576
577
  var modules = _.reduce(column.modules, (modules, id)=>{
577
578
  return modules + '{% '+id+' %}'
578
579
  }, '')
579
- html += `<div class="col ${column.class}">${modules}</div>` // inserts placeholder in format {% id %}
580
+ html += `<div data-column-id="${column._id}" class="col ${column.class}">${modules}</div>` // inserts placeholder in format {% id %}
580
581
 
581
582
  })
582
583
 
@@ -595,8 +596,6 @@ ceems.prototype.render = function(req, res, page=null) {
595
596
  })
596
597
  }
597
598
 
598
- console.log(renderedRegions)
599
-
600
599
  _.each(region.modules, function(module, index){
601
600
 
602
601
  var moduleTemplate = fs.readFileSync('./views/'+module.type+'.liquid');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nakedcreativity/cee-ms-node",
3
- "version": "0.3.37",
3
+ "version": "0.3.38",
4
4
  "description": "Cee.ms for Node.js",
5
5
  "main": "index.js",
6
6
  "scripts": {