Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Page in a page - GetSimple CE
#1
Hi every one.


On my landing page I want to display some "teaser" of some "normal" pages.



First I use a template just for this page.


For now I have 2 techniques for this.


1-I create child page of my landing page and then :

Code:
  <h3><?php getPageField('MyChildPageName1','title');?></h3>
    <p><?php getPageContent('MyChildPageName1'); ?>
    <h3><?php getPageField('MyChildPageName2','title');?></h3>
    <p><?php getPageContent('MyChildPageName1'); ?>
.......


OR

2-I use the new "Snippet" Menu to create different "teaser" and then :

Code:
<?php get_snippet("snippetName1");?>
<?php get_snippet("snippetName2");?>
....


I would like to find a way like a hook to get all the ChildPageName in getPageContent and GetPageField OR a hook to get all the snippetName ... if they exist.
So that I don't have to modify my theme to add each new Snippet or New Child Page to be displaued on my landing page.

May be a plugin like IN18 specialPage do this ??? but I prefer without a plugin and just with a bit of code in my theme

Thanks.


My landing page
Reply
#2
(2024-04-23, 00:49:25)daminoweb Wrote: May be a plugin like IN18 specialPage do this ??? but I prefer without a plugin and just with a bit of code in my theme

You can do this with i18n_search or with i18n_navigation. To style the output, you can use a component.

e.g.
Code:
(% searchresults component=teaser HEADER='' %)
Reply




Users browsing this thread: 1 Guest(s)