Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Creating pages without links  (Read 1730 times)

alks

  • Jr. Member
  • **
  • Karma: 0
  • Posts: 53
Creating pages without links
« on: September 26, 2010, 07:20:58 PM »

I have just been asked (by site users) if it is possible to create a page that does not auto-generate a link for itself so that they can link to it inside another page or article. eg they want to create 5 profile pages that can be linked to from one single page by adding the links themselves in the page content. Basically they dont want the links to appear in the navigation menus. I cant see an option for it in snews (snewsMU) at the moment - is it possible / has anyone else done this?

thanks

alks
Logged

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6019
  • Semantically Challenged
    • snews.ca
Re: Creating pages without links
« Reply #1 on: September 27, 2010, 03:47:59 PM »

I can't recall this being done before for sNews 1.6 versions including the MU package.
I think it could be though.

When publishing an article, we have the option of publishing the article (or not) with the "Publish Article" checkbox under the sNews Editor buttons.
By default, there is no publishing option checkbox in the new or edit Page panels.

I would create one, call it "Publish without showing in Menus" and make it save the page in the articles table with a new "published" option number... say '5' (for example). This would require some new variable strings in the functions where we create or edit pages, and in function processing, so that published option '5' gets saved to the articles table when that option is checked... and if not checked, save with published status of '1'.

For page menuing functions - using function pages() as an example, I would alter the query strings to show only content with published status of '1' which would filter out those that have published status of '5':
    In function pages() for example, the query string is:
          $query = "SELECT * FROM ".db('prefix')."articles WHERE position = 3 ORDER BY id";
    To show only pages with published status of 1, we'd add AND published = 1 before the ORDER BY id part
          $query = "SELECT * FROM ".db('prefix')."articles WHERE position = 3 AND published = 1 ORDER BY id";
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

alks

  • Jr. Member
  • **
  • Karma: 0
  • Posts: 53
Re: Creating pages without links
« Reply #2 on: October 03, 2010, 10:25:06 AM »

thanks keyrocks (sorry late reply - been occupied)
.
Altough not desperate for my current project (although they would like it)- i think this feature would be highly useful for a lot of snews projects and i would certainly want to use it in te future. In fact it would be good as a default option (using a tick box etc) on snews as standard.

Your ideas look like they may work, but i will need time to try them out (or perhaps someone more experinced with snews might be better at it than me.)

thanks,

alks

Logged

nukpana

  • Hero Member
  • *****
  • Karma: 71
  • Posts: 663
Re: Creating pages without links
« Reply #3 on: October 04, 2010, 05:11:53 AM »

Quick search gives me this: http://snewscms.com/forum/index.php?topic=8947.0

Not sure if it helps but it is a start.
Logged

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6019
  • Semantically Challenged
    • snews.ca
Re: Creating pages without links
« Reply #4 on: October 04, 2010, 02:31:15 PM »

Thanks for the link Jason.... that also led me to my Unpublished Articles and Pages mod for 1.7 which I had forgotten about.
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU