Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I display on the pages the custom fields? #3103

Closed
KiraTheUltimate opened this issue Apr 21, 2018 · 10 comments
Closed

How can I display on the pages the custom fields? #3103

KiraTheUltimate opened this issue Apr 21, 2018 · 10 comments
Labels
type: enhancement An improvement or new feature request type: question An ask about behavior that is not found documented anywhere
Milestone

Comments

@KiraTheUltimate
Copy link

KiraTheUltimate commented Apr 21, 2018

Hi!

I create a page category (book) and set up the custom fields, then I create a page and fill in the custom fields and save the page, but then nothing to show on the page.

How can I display on the pages the custom fields?

@fizi
Copy link

fizi commented Apr 22, 2018

Use {CPAGEFIELD: name=xxx} shortcode in page_template.php file.

@Jimmi08
Copy link
Contributor

Jimmi08 commented Apr 25, 2018

It's from January 2017 made by CaMeRon, not me. Not sure if something was changed. There is function in code (commented), if you uncomment it, you will get actual table.

customfields5

@KiraTheUltimate
Copy link
Author

Thank you! Works!

2 question:

  1. When I using an image field, the picture isn't clickable... how can I make it clickable? (to display the full size)

  2. When I using an url field, it only shows: -link-
    but I want the link to be named, like: "Next" ( {CPAGE}other ) or Buy it (external link)...

@KiraTheUltimate
Copy link
Author

Oh, sorry, not this image... but, when set up an image custom field on my site.

@Moc Moc added the type: question An ask about behavior that is not found documented anywhere label Apr 26, 2018
@CaMer0n
Copy link
Member

CaMer0n commented Aug 15, 2018

@KiraTheUltimate

  1. What URL do you wish to use for the 'clickable' image?
  2. <a href='{CPAGEFIELD: name=myurl&mode=raw}'>Buy It</a> or.. to wrap it, so it only displays when populated:
    $PAGE_WRAPPER['default']['CPAGEFIELD: name=myurl&mode=raw'] = "<a href='{---}'>Buy It</a>";

CaMer0n added a commit that referenced this issue Aug 15, 2018
CaMer0n added a commit that referenced this issue Aug 16, 2018
@KiraTheUltimate
Copy link
Author

@CaMer0n the url of the image... like on github. When I insert an image here this is clickable to the original size.

@CaMer0n
Copy link
Member

CaMer0n commented Aug 17, 2018

Fixed on github and an example added to the bootstrap3 page_template.php file.

@CaMer0n CaMer0n added this to the e107 2.1.9 milestone Aug 17, 2018
@CaMer0n CaMer0n added the type: enhancement An improvement or new feature request label Aug 17, 2018
@CaMer0n
Copy link
Member

CaMer0n commented Aug 17, 2018

@fizi I think you'll like these changes ;-)

@fizi
Copy link

fizi commented Aug 18, 2018

I like it. :)

@CaMer0n
Copy link
Member

CaMer0n commented Aug 18, 2018

Bootstrap3 "custom-fields" rendered example:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement An improvement or new feature request type: question An ask about behavior that is not found documented anywhere
Projects
Status: Backlog
Development

No branches or pull requests

5 participants