how can I anchor?

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
macangelo
Posts: 756
Joined: Sat 29. Nov 2003, 14:19
Location: Düsseldorf
Contact:

how can I anchor?

Post by macangelo »

I want to use anchors for long articles.

After I didn't find how to insert them I tried to figure out how to jump to a specific content part with in an article. They have IDs, but I can't figure out in the link, how to do that. (I've been to http://www.phpwcms.de/forum/viewtopic.php?t=720 for the Meaning of the IDs

Thanks a lot

Macangelo
Jan212
Posts: 859
Joined: Wed 28. Jan 2004, 21:38
Location: Solingen
Contact:

Post by Jan212 »

mark this
Image

PACE
Regards/ Grüsse/ Groetjes - JAN212
------------------------------------------------
null212 - Büro für Kommunikation und Design
------------------------------------------------
Lyrikfetzen des Tages
1. Ist der Quelltext auch valide fragt Herr Müller ganz perfide.
2. Wat is dat een lekker ding.
3. Wer Vision hat soll zum Arzt gehen.
------------------------------------------------
macangelo
Posts: 756
Joined: Sat 29. Nov 2003, 14:19
Location: Düsseldorf
Contact:

Post by macangelo »

Ok, to mark that was the easy part. What does it do?

and: do I have to use Pixelpeters Hack?

thanks a lot
Jan212
Posts: 859
Joined: Wed 28. Jan 2004, 21:38
Location: Solingen
Contact:

Post by Jan212 »

it makes an anchor like you'll see on this page http://www.phpwcms.de/index.php?id=14,0,0,1,0,0 in form of this button

Image
Regards/ Grüsse/ Groetjes - JAN212
------------------------------------------------
null212 - Büro für Kommunikation und Design
------------------------------------------------
Lyrikfetzen des Tages
1. Ist der Quelltext auch valide fragt Herr Müller ganz perfide.
2. Wat is dat een lekker ding.
3. Wer Vision hat soll zum Arzt gehen.
------------------------------------------------
macangelo
Posts: 756
Joined: Sat 29. Nov 2003, 14:19
Location: Düsseldorf
Contact:

Post by macangelo »

Got it. That's one half of what I need.

Second: How do I link down? Let's say to the beginning of the 7th content part.

Thanks a lot

Macangelo
ionrock
Posts: 279
Joined: Fri 20. Feb 2004, 17:04

Post by ionrock »

I think you would just have to hard code in the anchors your self in to the article. You could use a link list content type to actually link to them but I think for making the actual anchors you will have to do that yourself. I have never seen a way to add that using the phpwcms interface. But I could be wrong.
Jan212
Posts: 859
Joined: Wed 28. Jan 2004, 21:38
Location: Solingen
Contact:

Post by Jan212 »

yes, i think ionrock is right, you have to hardcode it...
Regards/ Grüsse/ Groetjes - JAN212
------------------------------------------------
null212 - Büro für Kommunikation und Design
------------------------------------------------
Lyrikfetzen des Tages
1. Ist der Quelltext auch valide fragt Herr Müller ganz perfide.
2. Wat is dat een lekker ding.
3. Wer Vision hat soll zum Arzt gehen.
------------------------------------------------
macangelo
Posts: 756
Joined: Sat 29. Nov 2003, 14:19
Location: Düsseldorf
Contact:

Post by macangelo »

yes, i think ionrock is right, you have to hardcode it...
Hi ionrock, Hi Jan212

I tried to dump

Code: Select all

<a name="discription"></a>
into my article - it didn't work (it was a WYSIWYG-content part). Do I have to hardcode the whole article?

Have a great start into the week

Macangelo
ionrock
Posts: 279
Joined: Fri 20. Feb 2004, 17:04

Post by ionrock »

You don't have to hardcode it. you can just go into plain text mode and add if after everything is done.
Jan212
Posts: 859
Joined: Wed 28. Jan 2004, 21:38
Location: Solingen
Contact:

Post by Jan212 »

you jump like <a href="#Zieldef">Ziel für Verweise definieren</a>

with a name you define the targetpoint
Regards/ Grüsse/ Groetjes - JAN212
------------------------------------------------
null212 - Büro für Kommunikation und Design
------------------------------------------------
Lyrikfetzen des Tages
1. Ist der Quelltext auch valide fragt Herr Müller ganz perfide.
2. Wat is dat een lekker ding.
3. Wer Vision hat soll zum Arzt gehen.
------------------------------------------------
Marko
Posts: 65
Joined: Tue 2. Dec 2003, 23:58
Location: Finland

Post by Marko »

I haven't tried this out, but isn't there a replacement tag for anchors in front.func.inc.php?

Code: Select all

	// anchor link
	$search[22]		= '/\{A:(.*?)\}/i';
	$replace[22]	= '<a name="$1"></a>';
Just try {A:}, x beeing your article id (I guess)... Tell me if I'm wrong, it wouldn't be the first time!
:shock:
Jan212
Posts: 859
Joined: Wed 28. Jan 2004, 21:38
Location: Solingen
Contact:

Post by Jan212 »

i think the snip you posted is to clean up exicisting anchors between rendering, but maybe i'm wrong, going to examine that
Regards/ Grüsse/ Groetjes - JAN212
------------------------------------------------
null212 - Büro für Kommunikation und Design
------------------------------------------------
Lyrikfetzen des Tages
1. Ist der Quelltext auch valide fragt Herr Müller ganz perfide.
2. Wat is dat een lekker ding.
3. Wer Vision hat soll zum Arzt gehen.
------------------------------------------------
jaredhales
Posts: 35
Joined: Wed 17. Mar 2004, 17:26
Contact:

Post by jaredhales »

any new developments on this? is there a way to easily link to specific content parts?

or do we just have to put the anchors in and link to them manually?

ideally, we could use a replacement tag where you would provide a content part id, and you are brought to the containing article at that specific content part. maybe something like:
{CONTENT:XXX}
where XXX is the content part's ID.
User avatar
Oliver Georgi
Site Admin
Posts: 9949
Joined: Fri 3. Oct 2003, 22:22
Location: Dessau-Roßlau
Contact:

Post by Oliver Georgi »

try to link to "#jumpID" like "jump34". But I can't remember in which content part this happens :oops:

ID = content part ID.

Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn
User avatar
Oliver Georgi
Site Admin
Posts: 9949
Joined: Fri 3. Oct 2003, 22:22
Location: Dessau-Roßlau
Contact:

Post by Oliver Georgi »

OK - I checked again - as far I can see - only per article.

I will think about implementing it again.

Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn
Post Reply