linking elegantly between entries

Get help with installation and running PivotX 2.0.x here. Please do not post Extension or Theme related questions here.

linking elegantly between entries

Postby vandenb » Mon Feb 24, 2014 9:22 pm

Hi,

I was wondering if there's a way to link 'elegantly' between entries in Pivotx. Not by pasting a url in the url-field, but by using an id or something? So that if you change the way your urls are built, the links between entries still work.

If I missed something obvious, forgive me, but searching for anthing with the word 'link' in it; well, you can imagine.

Cheers,
Walter
vandenb
 
Posts: 52
Joined: Wed Aug 27, 2008 7:06 pm

Re: linking elegantly between entries

Postby Harm10 » Mon Feb 24, 2014 9:45 pm

Quality is in the detail of things............

Want to change or update your PivotX site? Mail or PM me!
I can also convert your site to a Wordpress site!
Harm10
Developer
 
Posts: 2011
Joined: Wed Jun 17, 2009 9:37 am
Location: Somewhere in The Netherlands (aka Holland)

Re: linking elegantly between entries

Postby vandenb » Mon Feb 24, 2014 9:51 pm

Sure, but how do you use that when you're writing an entry? There's no popup on the toolbar for that, right?
vandenb
 
Posts: 52
Joined: Wed Aug 27, 2008 7:06 pm

Re: linking elegantly between entries

Postby Harm10 » Mon Feb 24, 2014 10:31 pm

Just put [[ link page='someuri' ]] or [[ link entry=15 ]] in your text.
Before the text is displayed it is parsed for such smarty tags.
The usage of template tags is not limited to your templates, they can also go into the text itself.
Quality is in the detail of things............

Want to change or update your PivotX site? Mail or PM me!
I can also convert your site to a Wordpress site!
Harm10
Developer
 
Posts: 2011
Joined: Wed Jun 17, 2009 9:37 am
Location: Somewhere in The Netherlands (aka Holland)

Re: linking elegantly between entries

Postby vandenb » Thu Feb 27, 2014 8:09 pm

Thanks for the answer, but the method doesn't work with me.

If I do this:
[[ link entry=4 text='link' fullurl=1]]

The output is this:
<a title="27 Feb '14" href="(my domain)">link</a>

And that date is the day that I publish the entry :-)

What am I doing wrong?
vandenb
 
Posts: 52
Joined: Wed Aug 27, 2008 7:06 pm

Re: linking elegantly between entries

Postby Harm10 » Thu Feb 27, 2014 8:29 pm

I guess the href is your domain including the entry part?
When you do not specify the title part it will get the title of the entry.
The code looks OK to me.
What version are you on and do you use mod_rewrite (configuration / general)?
Quality is in the detail of things............

Want to change or update your PivotX site? Mail or PM me!
I can also convert your site to a Wordpress site!
Harm10
Developer
 
Posts: 2011
Joined: Wed Jun 17, 2009 9:37 am
Location: Somewhere in The Netherlands (aka Holland)

Re: linking elegantly between entries

Postby vandenb » Thu Feb 27, 2014 8:49 pm

I only get <a href="mydomain.nl">, no entry, so that doesn't work...
I'm on 2.3.8 and mod_rewrite is on.
vandenb
 
Posts: 52
Joined: Wed Aug 27, 2008 7:06 pm

Re: linking elegantly between entries

Postby Harm10 » Thu Feb 27, 2014 10:28 pm

That is very weird. Where did you code the link? In another entry? Or in one of your templates?
I tested with the link coded in the introduction of one of my pages and that works OK.

You are using the example.htaccess file?
Quality is in the detail of things............

Want to change or update your PivotX site? Mail or PM me!
I can also convert your site to a Wordpress site!
Harm10
Developer
 
Posts: 2011
Joined: Wed Jun 17, 2009 9:37 am
Location: Somewhere in The Netherlands (aka Holland)

Re: linking elegantly between entries

Postby hansfn » Thu Feb 27, 2014 11:24 pm

Hm, could it be a bug? No, then it would have been reported many times before. You could try to rebuild the index
hansfn
Developer
 
Posts: 3280
Joined: Sun Nov 25, 2007 7:48 pm
Location: Molde, Norway

Re: linking elegantly between entries

Postby vandenb » Fri Feb 28, 2014 8:22 am

I will! And how would one do that, rebuilding the index? There used to be a button, I seem to remember...
vandenb
 
Posts: 52
Joined: Wed Aug 27, 2008 7:06 pm

Next

Return to 2.x Support Forum

Who is online

Users browsing this forum: No registered users and 6 guests

cron