taoguang
-
Posts
13 -
Joined
-
Last visited
Posts posted by taoguang
-
-
Hello, If my site is huge. My tree has more than 4 levels.
more often I need to maintain some of the branches.
Can I split my tree? Or you have a better solution? Thanks a lot!
-
yes,thank you. I had finish book's and author's page.
book:
<?php echo "<h1>" . $page->title . "</h1>"; foreach($page->author as $author) { echo "<h3><a href=\"$author->url\">" . $author->title . "</a></h3>"; } ?>
author:
<?php echo "<h1>" . $page->title . "</h1>"; echo "<h2>books:</h2>"; $id = $page->get('id'); $results = $pages->find("author=$id, limit=20"); foreach($results as $r) { echo "<a href=\"$r->url\">$r->title</a>"; } ?>
And can be linked to each other, but i just add one page-reference field: author.
is it ok?
- 1
-
How to write book's template?
<?php echo "<h1>" . $page->title . "</h1>"; echo "<h3>" . $page->author . "</h3>"; ?>
it just print author's id, i want print author's name and and add a link to author's page.
-
Thank you zeka, I'll try it now!
-
Hello, How to add authors to your articles?
ex you want to create a book library management system.
Now i add a new page named authors, then add many authors in it.
add a new page named books,then add many books in it.
in book template, i add new field named author, and add link to the author page in the authors.
Can anyone tell me how to complete it step by step?
-
By default, pw upload image or video to local ecs space, How to change to Amazon S3 space?
-
Thank you kixe!
-
Hello, I follow this post to add tags
Quote- Page Reference Field
- Parent page to hold the tags (for example: /config/tags/)
- Template for the tags
- Create the parent page /config/tags/
- Create the tags template (no need to have a file, and only needs one field "title")
-
Create a Page reference field. (called tags for this example)
a. In the settings "Allow new pages to be created from this field"
b. input field type: autocomplete, or whatever type works for what you are after.
Assign your "tags" field to templates where you want to allow tagging.
Now in my template:
$tags = explode(',', $page->tags); foreach ($tags as $tag) { $tag = trim($tag); echo $pages->find("tags=$tag"); }
But I just display the tags ID, How to display tags page's title?
-
Now I add a PW on my domain. It runs OK.
Then I have a second demo PW running under /demo/ subdirectory.
and adding these code to nginx rewrite:
location /demo/ { try_files $uri $uri/ /demo/index.php?it=$uri&$args; }
Then I access the subdirectory's homepage(/demo/) is OK, other page return a 404 error.
But I replaced the other cms to /demo/, It's really OK. Why?
How to fix these errors?
-
On 2017/8/22 at 9:58 PM, alexmercenary said:
Has anyone managed to get PW working in a sub directory as well.
I have PW running at route and also I have a second demo PW running under /demo/
I have tried adding:
location /demo/ { try_files $uri $uri/ /demo/index.php?it=$uri&$args; }
but if I try to navigate to any page other that the root page (/demo/) they are broken.
Any help would be appreciated.
I have the same problem. I got 404 page. PLS help me!
-
18 hours ago, kongondo said:
- 1
-
Hi! kongondo, Menu Builder is vety easy to use and powerful, But now I'm going to add some css3 effects to the menu.
Can you add a custom tpl parameter to the list item.
E.g. I want to make it
<li> <a href="">item name</a></li>
into
<li> <a href=""><span data="item name">item name</span></a></li>
The final effect is like this webpage's top menu:
How to split my tree if I need to manage thousands of pages and hundreds of categories?
in General Support
Posted
Thank you TPR! AdminOnSteroids is a good solution.