Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Plugin Request: Page Templates
#5
Perhaps DynPages?

You can define the piece of markup that you want to be editable as a component. Then you place identifiers that say where the content is editable. So for example, with your one for columns you would make two components: column and column-end:

column
Code:
<?php global $args; ?>
  <div style="float: <?php echo $args[0]; ?>; width: <?php echo $args[1]; ?>;">
column-end
Code:
</div>

Then on your page you would simply use the following content to call the whole column:

Code:
{% column 'FLOAT', 'WIDTH' %} COLUMN CONTENT {% column-end %}

Changing 'FLOAT' to the direction of alignment, 'WIDTH' to the width of the column and 'COLUMN CONTENT' to whatever content you want.

Basically, form your markup in a component with the code <?php global $args; ?> at the beginning of your component, then for every part of it that you want to be editable, use <?php echo $args[#]; ?>, numbering the arg accordingly starting from 0. When you use the placeholders on the page, you simply use the format { componentname 'arg0' 'arg1' etc... }. The markup can be as complicated as you need it to be.
Reply


Messages In This Thread
Plugin Request: Page Templates - by alienee2 - 2012-04-19, 03:05:43
Plugin Request: Page Templates - by Angryboy - 2012-04-19, 03:22:42
Plugin Request: Page Templates - by alienee2 - 2012-04-19, 03:39:32
Plugin Request: Page Templates - by n00dles101 - 2012-04-19, 06:13:50
Plugin Request: Page Templates - by Angryboy - 2012-04-19, 06:26:54
Plugin Request: Page Templates - by Carlos - 2012-04-19, 06:35:14
Plugin Request: Page Templates - by alienee2 - 2012-04-19, 06:50:40
Plugin Request: Page Templates - by alienee2 - 2012-04-19, 06:53:43
Plugin Request: Page Templates - by alienee2 - 2012-04-19, 06:55:08
Plugin Request: Page Templates - by Angryboy - 2012-04-19, 07:14:02
Plugin Request: Page Templates - by n00dles101 - 2012-04-19, 07:21:06
Plugin Request: Page Templates - by alienee2 - 2012-04-19, 11:47:13
Plugin Request: Page Templates - by alienee2 - 2012-04-19, 12:02:09
Plugin Request: Page Templates - by alienee2 - 2012-05-13, 04:27:44
Plugin Request: Page Templates - by n00dles101 - 2012-05-13, 07:05:32



Users browsing this thread: 1 Guest(s)