Forum
Duplicating Pages and Their Content?
I wondered if there is a way to achieve the following?
I have a site that has some landing pages for Adwords/Bing, ideally I want to track effectiveness of the campaigns. What I would like to do is have separate contact forms for each one so I can see where leads/jobs come from.
Creating the landing pages is fine, and even creating navigation menus specific to Adwords/Bing. But the problem is unless I duplicate every page in the site that occurs from the menu as soon as the go to a page "outside" the landing page the menus will be from the regular site. For example all landing pages have a link to Ordering Information and a Gallery, I dont want to have to recreate those.
So while I know how to create shared content, I don't want to share every bit of content as some pages might have unique content to that landing page.
Is there a way to duplicate an existing page but using a new template that has a different navigation menu (I know how to do that in a template but not how to reuse another page's content).
Or is there a way to reference content from an existing page in a new template?
Or is there a way to share content but keep the original associated with the page it was created in?
Currently the only way I can see to do this is to create from scratch duplicate pages and manually add the same content in which seems daft.
Use
perch_content_custom()
with thepage
option.Hello Drew, thanks. I spotted that one after I posted.
I wonder, is there an easier way to duplicate a whole page of content? Lets say I have following page content:
I want to duplicate the whole page and simply replace <?php perch_layout('photo.header'); ?> with <?php perch_layout('adwords.header'); ?>
Basically I want to have a different menu system pointing to that subdirectory so that its like a microsite just for PPC visitors?
You're just passing a string into
perch_layout()
, so the value of that string can be determined by any logic you want to add to the page. It could be something in Perch like a page attribute, or it could be something environmental like the URL of the page. It's really up to you.So how would I achieve what I want, what I want is a duplicate of a page from the main directory inside a subdirectory. Everything the same apart from the menu <?php perch_layout('photo.header'); ?>
Is there a way to reuse everything inside <!-- Main Content --> <!-- End Main Content -->
and only amend <?php perch_layout('photo.header'); ?> and <?php perch_layout('photo.footer'); ?>
The reason is, the landing page will change, but I dont want them to navigate away to the main site. This way I can track any conversions with more precision.
I know many people use landing pages with no navigation, just contact form but this is not useful for my purposes.
Yes, I think you can achieve what you want.
I have not got a clue how I would do that! Any pointers?
Are you wanting to switch based on the URL?
In as much as anything within a subdirectory needs to have a different <?php perch_layout('photo.header'); ?> and <?php perch_layout('photo.footer'); ?>
So for example if the subdirectory were /google then I would change those to <?php perch_layout('adwords.header'); ?> and <?php perch_layout('adwords.footer'); ?>
So it sounds like you need to:
/google
and has more than 1 segment, include the alternative layout.