SimplePortal

Customization => Blocks and Modifications => Block Requests => Topic started by: zapiy on October 08, 2009, 12:18:48 PM

Title: Latest Custom Pages block
Post by: zapiy on October 08, 2009, 12:18:48 PM
Sorry i may have missed this but is there a custome pages block?
Title: Re: Latest Custom Pages block
Post by: Nathaniel on October 08, 2009, 05:25:43 PM
No, there is no custom pages block.

What exactly do you mean by 'custom pages block' though?
Title: Re: Latest Custom Pages block
Post by: sshahnawaz on October 08, 2009, 05:46:49 PM
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.  :)
Title: Re: Latest Custom Pages block
Post by: zapiy on October 09, 2009, 05:45:17 AM
Everytime a new page is created the block gets a link to the new page based on the page title..
Title: Re: Latest Custom Pages block
Post by: Tones on December 17, 2009, 07:56:34 AM
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.
Title: Re: Latest Custom Pages block
Post by: homer09001 on December 27, 2009, 08:23:00 PM
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?
Title: Re: Latest Custom Pages block
Post by: DR.M on January 04, 2010, 02:27:13 PM
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!
Title: Re: Latest Custom Pages block
Post by: [SiNaN] on January 07, 2010, 01:07:19 PM
Listing latest custom pages is pretty easy. You can use this in a PHP block:

Code: [Select]
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>';
Title: Re: Latest Custom Pages block
Post by: Tones on January 16, 2010, 06:01:17 PM
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.
SimplePortal 2.3.8 © 2008-2024, SimplePortal