Skip to content

List pages #322

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

Closed
ctuxboy opened this issue Oct 13, 2024 · 3 comments
Closed

List pages #322

ctuxboy opened this issue Oct 13, 2024 · 3 comments

Comments

@ctuxboy
Copy link

ctuxboy commented Oct 13, 2024

Hello,

Is there a way/code snippet iterate over the pages? So i can show a list of pages on the website?
Found a code snippet on github, but it is outdated.

@joho1968
Copy link

If you look at the file theme.php in this theme, you might find what you need:

https://github.com/joho1968/wcms-bs5

@ctuxboy
Copy link
Author

ctuxboy commented Oct 14, 2024

If you look at the file theme.php in this theme, you might find what you need:

https://github.com/joho1968/wcms-bs5

Hi @joho1968 ,
I found your awesome theme yesterday, you made it wit a search function. Good work 👍
I try understand your code (i'm not a pro developer but can understand small snippets, and OOP it's difficult to understand for me :/).

My goal is a really small foodprint, without the Simple Blog plugin, so a homepage, that listed all the pages (excl. the home-page itself).
I using also a small css framework

Here you see my first steps/experimenting what i try to build, with the Simple Blog plugin, but i can list pages without this plugin, this would awesome, so i can show the keywords/tags (what i missed i the plugin).
(Optional i will adding an about-page and a contact-page.)

But i will give it a try :) It's the best solution until now.
In the beginning whant only a list of pages.

EDIT:
Learning a lot from your code. My first steps:

$allItems = $Wcms->db->pages;
print_r( $allItems );

That's the result. Next step try found out how print only the titles and links :)

hmm, when looking in database.js, the slugs are in the menuItems and not in the pages, this makes it difficult :/

@robiso
Copy link
Collaborator

robiso commented Mar 3, 2025

@ctuxboy did you manage to resolve this to fit your needs? If not, please feel free to re-open this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants