Nerdmind/Blog

Ability to add pages which are "hidden"

Closed this issue · 1 comments

Hey,

I would like to add pages like a footer, but i dont want them to be displayed on the "pages" Page.

Is this possible somehow?

If you need further clarification, just ping me :)

Hi. Items which you create within the content editor are not intended for such a purpose (it's maybe easier to put your footer information directly into the template [main.php for example] – thats why they are customizable). But if you want it anyway, you can use one of those (currently yet undocumented) functions within your template to get data from a specific item:

PAGE(id)
POST(id)
USER(id)

So, if you have a page with your footer content (lets assume the page ID is 2), you can access the data from this page by calling PAGE(2) from your template. This 3 functions will return an array with any information of the item. Just var_dump() them to see what's inside.

If you want to exclude an item from (for example) the items overview list, you can use the new argument-passing functionallity which is available since version 2.0 and documented on the wiki of this repository. This has been implemented for exactly such and other purposes! =)

html/page/item.php:

<?php if(!isset($PAGE['ARGV']['EXCLUDE'])): ?>
	<li class="item-list-li page">
		[…]
	</li>
<?php endif; ?>