Jump to content

Archived

This topic is now archived and is closed to further replies.

tunbosun

Custom Page Template

Recommended Posts

tunbosun

I am using pagelines DMS and have already created a Child Theme.

But the problem I have is creating a Custom Page Template, I have done all the requried things to no avail.

If I go the create new page under the WordPress admin I can't find the option to select the page template.

The name of my custom page template is page.cartlogin.php

<?php
/*
Template Name: Cart Login
*/
setup_pagelines_template();
//pagelines_setup_template();
?>

The image below displays how the template option is displayed in the Add New Page

Share this post


Link to post
Share on other sites
Rob

Create the page in WP and do not assign a template.

 

Browse to the page in Chrome.  Create a New Template while on the page and save it. 

 

Now, layout your page as desired and save the template again.

 

Then, publish the page. The template will be assigned. If you set it to global (bottom, left side), then it will be global for all pages of that type.


Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
tunbosun

Create the page in WP and do not assign a template.

 

Browse to the page in Chrome.  Create a New Template while on the page and save it. 

 

Now, layout your page as desired and save the template again.

 

Then, publish the page. The template will be assigned. If you set it to global (bottom, left side), then it will be global for all pages of that type.

This isnt' what I want to do.

I want to create an empty page in the WordPress admin area. And assign a custom page template to it.

The page is meant to display custom loop as defined in the custom page template.

Or doesn't Pagelines DMS support WordPress Custom Page Template.

If it doesn't this is sad.

Share this post


Link to post
Share on other sites
fumitol

It appears that this may be a bug in DMS that Pagelines is currently working on.

 

The source of the information I just provided you is here.

Share this post


Link to post
Share on other sites
Rob

It may also be simple misunderstanding.  The creation of a new page is still done via WordPress Dashboard > Pages > Add New.  However, there isn't a template to add there as you're used to doing.  As I pointed out, you then go to DMS, viewing that page, and you apply the layout you want.  You can leave the postloop off if you have intent to add it via the Page Editor in WP.

 

But, the saving of the template you create by editing the page in DMS, then creating a custom template from that page, and applying it locally by publishing is the way DMS works.  It will not show up on the right side of the WP Edit screen. And you need not worry about that.

 

The page should appear as you lay it out in DMS, when viewed in other browsers.


Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
Rob

In DMS, you create a template.  Include anything on it that you like.  Save the template.  When you do, you can assign that template to the page (the same element of the page you pointed to in your example) which should be headed DMS Page Setup.  Custom templates are saved easily in DMS.  I know I sound like a broken record, but the info is all in the docs. http://docs.pagelines.com


Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
clinton4

Rob

 

Yes i understand that procedure. But that solution would limit my options of customisation. Or at least make it much more complicated to work with.

 

Lets say i want a page that looks like this:

 

image.png

The custom field data is custom field data created within the current page.

 

How can i achieve this the DMS layout way? I cant se that this is possible.

 

If it's possible, is there any tutorial which explain how?

 

DMS is new to me and I am used to do it the wp codex way :)

Share this post


Link to post
Share on other sites
Rob

First, if you have the fields set up correctly in WP, and they display in the postloop, then its simply a matter of layout.   Each custom post type, wrapped in its own CSS class or ID can be positioned as needed, provided you do the right CSS code to match.


Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
clinton4

Rob

 

Not sure what you mean by "if you have the fields set up correctly in WP".

 

In a page i have created a custom field called "mycustomfield" containing the text "my custom data".

 

image.png

 

Now, I don't know how to get the content of "mycustonfield" to display on that page. How do i do that?

 

 

 

 

Share this post


Link to post
Share on other sites
Rob

It should be in the postloop. As you can see, that's WP, not DMS.  We only pull the postloop and style what's there.   We don't pull the custom fields differently or uniquely.  They display as part of the postloop.

 

See http://codex.wordpress.org/Custom_Fields

 

There are plugins that help with this.  Check the latest ones or ones recently updated.  The plugins with the most downloads usually has the best support and compatibility.


Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
clinton4

Rob

 

I am not sure if you understand what i am trying to achieve, or that I am not understanding what you are trying to tell me :)

 

Since I have created a custom field on this page, I reckon the data from "mycustomfield"  is inside "The Loop". But I have no idea on how to get it visual on the page.

 

Normaly i would do something like this in a page template (example: page.php):

<?php $mycustomfield = get_post_meta($post->ID, 'mycustomfield', true); ?>
<?php echo $mycustomfield; ?>

But with DMS, I have no clue whatsoever.

 

When you mention plugins. Do you mean like a plugin which would let me use a shortcode within the pages content to pull and displays the custom field data there?

 

For example: My custom field key is "mycustomfield". I could then use [mycustomfield] within the pages content do display the data inside my custom field?

 

 

 

Share this post


Link to post
Share on other sites
bfrye26

clinton4 I think you would need to use the Hooks method to get this to work. I don't think with DMS you can do it another way sadly. At least not from what I have found

Share this post


Link to post
Share on other sites
clinton4

Rob...When you mention plugins. Do you mean like a plugin which would let me use a shortcode within the pages content to pull and displays the custom field data there?
 
For example: My custom field key is "mycustomfield". I could then use [mycustomfield] within the pages content do display the data inside my custom field?


After som sleep I now see that this would not be dynamically. In this scenario I could just put the data right in the content. So I guess hooks is the only way to go.

Share this post


Link to post
Share on other sites
klausk

Create the page in WP and do not assign a template.

 

Browse to the page in Chrome.  Create a New Template while on the page and save it. 

 

Now, layout your page as desired and save the template again.

 

Then, publish the page. The template will be assigned. If you set it to global (bottom, left side), then it will be global for all pages of that type.

I was having an issue selecting my custom DMS template on the Wordpress page editor sidebar, and this workaround worked.

Share this post


Link to post
Share on other sites
Danny

To add custom Fields to your template you can either use shortcodes if using a an plugin such as ACP or use hooks.

 

We are aware of the template dropdown not applying templates, this has already been reported.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites

×