SimplePortal
Customization => Blocks and Modifications => Block Requests => Topic started by: zapiy on October 08, 2009, 12:18:48 PM
-
Sorry i may have missed this but is there a custome pages block?
-
No, there is no custom pages block.
What exactly do you mean by 'custom pages block' though?
-
Well, I also need a Custom Pages Block and by saying Custom Pages Block, I mean a category in my website not visible in my forum directly but in which we can have navigation links same as we do have in forum navigation bar, such as home, search, profile etc. We want to create a category of articles and in articles, we will include educational, law-related and other kinds of articles. So the block will contain the links to all those articles and when clicked on any of them, will go to that page having all the article links in it, so that we may not have to choose the articles from the board as we currently are doing. :)
-
Everytime a new page is created the block gets a link to the new page based on the page title..
-
What would be good is a pages block, that when creating, you are provided with a list of all current custom pages with a selection box, and you can select what pages will appear in that block. Then we could if needbe create multiple instances of a pages block displaying alink to various pages.
-
Let me get this correct, a block that:
-Act like a menu listing all current Custom Pages created
-Gives admin the ability to make custom page visible on block.
this shouldn't be to difficult to do
Would it be standard text hyperlinks or a drop down box?
do you want it to display all, or just recent say last 30 days etc?
-
What would be good is a pages block, that when creating, you are provided with a list of all current custom pages with a selection box, and you can select what pages will appear in that block. Then we could if needbe create multiple instances of a pages block displaying alink to various pages.
This would be a great addition to SP!
-
Listing latest custom pages is pretty easy. You can use this in a PHP block:
global $scripturl;
$pages = sportal_get_pages(null, true);
echo '
<ul>';
foreach ($pages as $page)
echo '
<li><a href="', $scripturl, '?page=', $page['page_id'], '">', $page['title'], '</a></li>';
echo '
</ul>';
-
i took the long route and added a menu item to subs.php. Not exactly efficient but as my pages wont be changing then its an edit thats only performed once and doesnt need updating but ty SiNaN, that'll come in handy if i add to it.